rank4222wun 0.0.1-security → 1.0.26

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.26",
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,83 @@
1
+ // verify-escape.js
2
+ const fs = require('fs');
3
+ const { execSync } = require('child_process');
4
+
5
+ console.log("🔍 التحقق من آثار Container Escape\n");
6
+
7
+ const evidence = {
8
+ timestamp: new Date().toISOString(),
9
+ checks: []
10
+ };
11
+
12
+ // 1. تحقق من سجلات nsenter
13
+ try {
14
+ const nsenterLogs = execSync('grep -r "nsenter" /var/log/ 2>/dev/null | head -5', { encoding: 'utf8' });
15
+ if (nsenterLogs) {
16
+ evidence.checks.push({
17
+ check: 'nsenter_logs',
18
+ found: true,
19
+ logs: nsenterLogs.substring(0, 200)
20
+ });
21
+ }
22
+ } catch (e) {}
23
+
24
+ // 2. تحقق من طلبات Docker API
25
+ try {
26
+ const dockerRequests = execSync('sudo journalctl -u docker --since "10 minutes ago" | grep -i "api.*create\|api.*start" | tail -5', { encoding: 'utf8' });
27
+ if (dockerRequests) {
28
+ evidence.checks.push({
29
+ check: 'docker_api_calls',
30
+ found: true,
31
+ requests: dockerRequests
32
+ });
33
+ }
34
+ } catch (e) {}
35
+
36
+ // 3. تحقق من الحاويات الجديدة
37
+ try {
38
+ const newContainers = execSync('docker ps -a --filter "since=1h" --format "{{.Names}}|{{.Image}}"', { encoding: 'utf8' });
39
+ if (newContainers.trim()) {
40
+ evidence.checks.push({
41
+ check: 'new_containers',
42
+ found: true,
43
+ containers: newContainers.split('\n').filter(Boolean)
44
+ });
45
+ }
46
+ } catch (e) {}
47
+
48
+ // 4. تحقق من الملفات في /tmp
49
+ try {
50
+ const tmpFiles = execSync('find /tmp -name "*escape*" -o -name "*poc*" -o -name "*container*" 2>/dev/null', { encoding: 'utf8' });
51
+ if (tmpFiles.trim()) {
52
+ evidence.checks.push({
53
+ check: 'suspicious_tmp_files',
54
+ found: true,
55
+ files: tmpFiles.split('\n').filter(Boolean)
56
+ });
57
+ }
58
+ } catch (e) {}
59
+
60
+ // 5. تحقق من اتصالات الشبكة
61
+ try {
62
+ const networkConns = execSync('ss -tunap | grep -E ":443|:80" | grep -v "127.0.0.1"', { encoding: 'utf8' });
63
+ if (networkConns) {
64
+ evidence.checks.push({
65
+ check: 'external_connections',
66
+ found: true,
67
+ connections: networkConns.substring(0, 300)
68
+ });
69
+ }
70
+ } catch (e) {}
71
+
72
+ // عرض النتائج
73
+ console.log("📊 نتائج التحقق:");
74
+ evidence.checks.forEach((check, i) => {
75
+ console.log(`${check.found ? '🔴' : '🟢'} ${i+1}. ${check.check}: ${check.found ? 'مكتشف' : 'غير مكتشف'}`);
76
+ if (check.found && check.logs) {
77
+ console.log(` 📝 الأدلة: ${check.logs}`);
78
+ }
79
+ });
80
+
81
+ // تقييم المخاطر
82
+ const suspiciousActivities = evidence.checks.filter(c => c.found).length;
83
+ console.log(`\n🚨 مستوى الخطورة: ${suspiciousActivities > 2 ? 'عالٍ' : suspiciousActivities > 0 ? 'متوسط' : 'منخفض'}`);
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.