This is an automated exploitation script for the Hack The Box machine Titanic. A full exploitation automation script for the Titanic HTB Linux machine on Hack The Box. Full write Up -> WriteUp.md
It performs the following actions:
- Phase 1: Retrieve and parse the
gitea.dbfile via LFI to extract user hashes - Assist with hashcat format to crack developer's password (PBKDF2-HMAC-SHA256)
- Phase 2: Use cracked credentials to connect via SSH and exploit
CVE-2024-41817(ImageMagick) to gain root access via a malicious shared library
pip install -r requirements.txtpython3 autopwn.py --phase 1This will fetch the
gitea.dband print hashcat-ready hashes for cracking.
After cracking the developer's password:
python3 autopwn.py --phase 2 --ssh-user developer --ssh-pass <cracked_password>This phase uploads a malicious shared object and a dummy image to trigger identify_images.sh.
You will then:
- Connect via SSH
- Wait a few seconds for the cron to process the image
- Run
bash -pto obtain a root shell
- Python 3.x
gcc(for compiling the malicious.sofile)- Access to
hashcat(external)