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 PoC for Nim Lang
Readme
**Exploring Command Injection Vulnerabilities in Windows with Nim**

* https://foxoman.hashnode.dev/exploring-command-injection-vulnerabilities-in-windows-with-nim?showSharer=true

Here's a summarized table based on the testing results from the Nim code experiments with different payloads:

| Payload                | execProcess_NoQuoteShell | execProcess_QuoteShell | execShellCmd |
|------------------------|--------------------------|------------------------|--------------|
| `nim &calc`            | Not Passed               | Not Passed             | Passed       |
| `nim" &calc`           | Passed                   | Not Passed             | Not Passed   |
| `%CMDCMDLINE:~-1%&calc`| Passed                   | Passed                 | Passed       |

"Passed" indicates the payload executed in a way that could potentially exploit the BatBadBut vulnerability, demonstrating the nuanced behavior of command execution methods in Nim in response to different types of inputs.


----

- CVE-2024-24576 PoC on GitHub: [https://github.com/frostb1ten/CVE-2024-24576-PoC](https://github.com/frostb1ten/CVE-2024-24576-PoC)
- Flatt Security Research article: [https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/](https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/)
File Snapshot

[4.0K] /data/pocs/d2646d5cbfdd1cc6d3aa05642afab70d554a7062 ├── [ 953] main.nim ├── [1.3K] README.md └── [ 37] test.bat 0 directories, 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.