← Back to HWJ CTF

QR HERE !!!

Decode a mailto QR code from a PDF document to extract the URL-encoded flag.

Tools Used

zbarimgpyzbarCyberChefURL Decoder

Overview

The challenge provides a PDF containing a single QR code. The goal is to decode the QR code and extract the flag from the decoded payload.

Reconnaissance

Opening the PDF shows a single QR code image. We scan the QR code using CLI tools like zbarimg or Python's pyzbar.

Exploitation Strategy

The decoded QR output is a mailto: URI: mailto:hacker@gmail.com?subject=you get it here&body=hwj%7Bth3r3_4r3_n0t_m4ny_f1l35%7D.
URL decoding the body parameter hwj%7Bth3r3_4r3_n0t_m4ny_f1l35%7D yields the flag.

Solution Code

zbarimg qrcode.png
# Decoded URI: mailto:hacker@gmail.com?subject=you get it here&body=hwj%7Bth3r3_4r3_n0t_m4ny_f1l35%7D
# URL decode body parameter:
# hwj%7Bth3r3_4r3_n0t_m4ny_f1l35%7D -> hwj{th3r3_4r3_n0t_m4ny_f1l35}

Flag

hwj{th3r3_4r3_n0t_m4ny_f1l35}