Proof of Concept exploit for ImageMagick versions <= 7.1.1-35 allowing arbitrary code execution via malicious XML delegation.
This exploit takes advantage of a vulnerability in ImageMagick that allows arbitrary code execution through specially crafted libraries. The script can:
- Detect vulnerable ImageMagick versions
- Generate malicious payloads
- Automatically deploy and execute the exploit
- Python 3.11+
- GCC >= 9.4.0
- Python packages:
- paramiko
git clone https://github.com/Dxsk/CVE-2024-41817-poc/
cd CVE-2024-41817-poc
pip install -r requirements.txtpython3 exploit.py -H <target> -p <port> -u <user> -P <password> -dpython3 exploit.py -c "command" -Bpython3 exploit.py -c "command" -H <target> -p <port> -u <user> -P <password> -A-c, --command: Command to execute (default: "id")-H, --host: Target host-p, --port: SSH port (default: 22)-u, --username: SSH username-P, --password: SSH password-d, --detection: Auto-detect ImageMagick if vulnerable-B, --build: Only build the payload-A, --auto: Full auto mode-v, --verbose: Verbose output
- Ubuntu 22.04.5 LTS
- ImageMagick 7.1.1-35
- Daihyxsk
- Github: https://github.com/Dxsk
- ImageMagick Security Advisory
- CVE: CVE-2024-41817
This tool is for educational purposes only. Use it only against systems you have permission to test.