
An exploit automation script that builds upon the work of Voidzone security.
This script automates the exploitation of CVE-2022-44268 (ImageMagick file disclosure).
image.png).exiftool to extract and print the exfiltrated file content.requests library: pip install requestshttps://git.rotfl.io/v/CVE-2022-44268.gitcargo build in its directory.exiftool command-line tool.wget command-line tool.git clone https://git.rotfl.io/v/CVE-2022-44268.gitcd CVE-2022-44268cargo buildautomate_exploit.py) INSIDE the CVE-2022-44268 directory.You MUST edit the Python script (automate_exploit.py) for your target. Key variables to change:
payload: Path to the malicious image.png generated by the Rust PoC.
"/home/kali/usr/htb/pilgrimage/CVE-2022-44268/image.png""image.png" (since the script runs where image.png is created).url: The target URL for image upload.
"http://pilgrimage.htb""http://vulnerable-site.com/upload").proxies (optional): For routing traffic (e.g., through Burp Suite).
{'http': 'http://127.0.0.1:8080'}None if not needed.Host header (inside the headers dictionary): Should match the hostname in your url.
'Host': 'pilgrimage.htb'Ensure you are in the CVE-2022-44268 directory (where automate_exploit.py and the Rust PoC are).
Run the script, providing the target file path to exfiltrate as an argument:
python3 automate_exploit.py "/etc/passwd"