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
PoC for CVE-2024-24576 vulnerability "BatBadBut"
Readme
# CVE-2024-24576-PoC-BatBadBut

PoC for CVE-2024-24576 vulnerability "BatBadBut"

## Information

After running the script will ask you for an argument, the argument will be passed the the bat file, if you close the argument with " and after that & you can run any Windows command.
For example:
```cmd
helloworld" & whoami
```

As a result, you will get the whoami command.

Of course in real time it would not look like that, this is just PoC for the CVE.

## Usage

Clone the repository:
``` cmd
git clone https://github.com/SheL3G/CVE-2024-24576-PoC-BatBadBut.git
```

Running the script:
```py
Python CVE-2024-24576.py
```
To make it work type something close with " and then "&" and any command like calc.exe, hostname, whoami...
```cmd
HelloWorld" & hostname
```
The Flow of the CVE and the possible way to make it work
![Flow](https://flatt.tech/research/batbadbut-you-cant-securely-execute-commands-on-windows/flowchart.svg)

## Credits

* [NIST](https://nvd.nist.gov/vuln/detail/CVE-2024-24576)

* [flatt.tech](https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/)

* [Mental Outlow](https://www.youtube.com/watch?v=jqsoSmOBFrQ)

## License

[MIT](https://choosealicense.com/licenses/mit/)
File Snapshot

[4.0K] /data/pocs/8e60c7f609ecbbc2ca654b6b3194029e31b71030 ├── [1.1K] CVE-2024-24576.py ├── [1.0K] LICENSE ├── [ 36] poc.bat └── [1.2K] README.md 0 directories, 4 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.