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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-35374 PoC — Mocodo 安全漏洞

Source
Associated Vulnerability
Title:Mocodo 安全漏洞 (CVE-2024-35374)
Description:Mocodo是Mocodo开源的一种帮助教学和学习相关知识基础的软件。 Mocodo 4.2.6及之前版本存在安全漏洞,该漏洞源于无法正确清理sql_case输入字段,允许远程攻击者执行任意SQL命令,从而在某些条件下导致远程代码执行(RCE)。
Description
A Metasploit module for CVE-2024-35374
Readme
# CVE-2024-35374
A Metasploit module for [CVE-2024-35374](https://nvd.nist.gov/vuln/detail/CVE-2024-35374)
## Usage
To use this module, you will first need to add it to Metaploit. Copy the `.rb` file into the Metasploit database with the following comamnd.
```bash
sudo cp cve_2024_35374.rb /usr/share/metasploit-framework/modules/exploits/unix/http/cve_2024_35374.rb
```
Then, open the Metasploit console, reload the database, and use the exploit.
```
reload_all
use exploit/unix/http/cve_2024_35374
```
Then, run `info` to see the options and information provided. The default payload, `generic/custom` works best with this exploit. Use the `PAYLOADSTR` variable to execute shell commands on the remote host. 
## Testing
Use the provided Dockerfile to build a test web application.
```bash
docker build -t mocodo .
docker run -d -p 80:8080 mocodo
```
Once built and running, you can then run the Metasploit module against the container. 
## Notes
For additional information on this exploit, see my [blog post](https://blog.rikoot.com/posts/cve-2024-35374/). 
File Snapshot

[4.0K] /data/pocs/7c5951ef6a8ab12804f019a83a2292816ff74b18 ├── [2.9K] cve_2024_35374.rb ├── [ 567] Dockerfile └── [1.0K] README.md 1 directory, 3 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.