目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2022-39066 PoC — ZTE MF286R SQL注入漏洞

来源
关联漏洞
标题: ZTE MF286R SQL注入漏洞 (CVE-2022-39066)
Description:ZTE MF286R是中国中兴通讯(ZTE)公司的一款无线路由器。 ZTE MF286R存在安全漏洞,该漏洞源于对电话簿接口的输入参数验证不足。攻击者利用该漏洞执行任意SQL。
Description
Proof of concept of the SQL injection vulnerability affecting the ZTE MF286R router.
介绍
# CVE-2022-39066

Firmware details:

```
wa_inner_version: BD_POSTEMF286RMODULEV1.0.0B12
cr_version: CR_ITPOSTEMF286RV1.0.0B10
```

## Prerequisites

- requests (`pip install requests`)

## SQL injection

The vulnerability is a SQL injection present in the handler `PHONE_BLOCK_ADD` in the webserver `goahead` binary.

Possible exploits:

- delete any record in any database
- add fake records in any database
- create a file with chosen name in any directory with `rw-` permissions if this file does not exists
- memory dos
- ...

The PoC for this vulnerability is present in this directory, please ensure that syslogs aren't enabled because we need that the file didn't exists. Use the script `poc.py` with the following command:

```bash
$ python3 exploit.py http://<router> <admin_password>
```
 
It shows how an attacker can write a file, in this case I'll write a file in the `/var/log/webshow_messages` (web log) and I'll get the writed file through `cgi-bin/ExportSyslog.sh`

Basically the script use the payload `test'); ATTACH DATABASE '/var/log/webshow_messages' AS t; CREATE TABLE t.pwn (dataz text);INSERT INTO t.pwn (dataz) VALUES ('testestestest');--"`


## Author

- Andrea Maugeri

## References

https://support.zte.com.cn/support/news/LoopholeInfoDetail.aspx?newsId=1027744

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →