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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-24576 PoC — Rust 安全漏洞

Source
Associated Vulnerability
Title:Rust 安全漏洞 (CVE-2024-24576)
Description:Rust是美国Mozilla基金会的一款通用、编译型编程语言。 Rust 1.77.2之前版本存在安全漏洞,该漏洞源于没有正确转义Windows上批处理文件的参数,攻击者可以通过绕过转义来执行任意shell命令。
Description
CVE-2024-24576 Proof of Concept
Readme
# CVE-2024-24576-Exploit

The `Command::arg` and `Command::args` APIs state in their documentation that the arguments will be passed to the spawned process as-is, regardless of the content of the arguments, and will not be evaluated by a shell. This means it should be safe to pass untrusted input as an argument.

On **Windows**, the implementation of this is more complex than other platforms, because the Windows API only provides a single string containing all the arguments to the spawned process, and it's up to the spawned process to split them. Most programs use the standard C run-time argv, which in practice results in a mostly consistent way arguments are splitted.

One exception though is cmd.exe (used among other things to execute batch files), which has its own argument splitting logic. That forces the standard library to implement custom escaping for arguments passed to batch files. Unfortunately it was reported that our escaping logic was not thorough enough, and it was possible to pass malicious arguments that would result in arbitrary shell execution.

![image](https://github.com/aydinnyunus/CVE-2024-24576-Exploit/assets/52822869/debaab71-532c-4cc2-8be8-ef7d27f9c7f8)

Reference: https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html
File Snapshot

[4.0K] /data/pocs/9ab7bf0af383b5617a9297096a049909276067c8 ├── [ 678] main.go ├── [ 506] main.py ├── [1.4K] main.rs ├── [1.2K] README.md └── [ 29] test.bat 0 directories, 5 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.