As with any penetration test, the first step is comprehensive reconnaissance.
The challenge presents a web application designed to take a user-supplied URL and convert that web page into a downloadable PDF document. By understanding how the backend PDF rendering engine processes redirects, you can bypass local restrictions to read sensitive system files and capture the flag.
This walkthrough is intended for educational and ethical security research purposes within the context of the Hack The Box platform.
PDFy is a popular challenge on HackTheBox that tests your ability to identify and exploit Server-Side Request Forgery (SSRF) vulnerabilities. The target application features a seemingly simple utility: it takes a user-provided URL and converts the webpage into a downloadable PDF document. pdfy htb writeup upd
This means the application implements a blocklist or a basic validation filter to prevent standard local lookups. To bypass this restriction, we need to look at how the application handles redirects. Inspecting the PDF Metadata
Upon navigating to the target IP address and port in your browser, you are met with a clean, minimalist web utility. The primary interface features a single input box requesting a URL. 1. Basic Functionality Test
This public link is valid for 7 days and shares a thread, including any personal information you added. This link or copies made by others cannot be deleted. If you share with third parties, their policies apply. Can’t copy the link right now. Try again later. As with any penetration test, the first step
Identifying within document generation systems.
We need to set up our own attacker server. Here, we'll use a simple HTTP server (like Python's http.server ) and expose it to the internet using ngrok to bypass potential firewall issues.
challenge on Hack The Box (HTB) is an easy-rated web challenge that focuses on identifying and exploiting a Server-Side Request Forgery (SSRF) vulnerability in a web-to-PDF conversion service. Challenge Summary Vulnerability: Server-Side Request Forgery (SSRF). Target Component: wkhtmltopdf (a command-line tool used to render HTML into PDF). This walkthrough is intended for educational and ethical
: Never allow users to supply arbitrary network URIs. If rendering external sites is required, enforce a strict whitelist of safe, authorized domain names.
The underlying component wkhtmltopdf is well-known for specific LFI and SSRF behaviors. While the frontend filter strips out input attempts starting with file:// , it blindly trusts standard http:// paths hosted on remote web addresses.