advertisememt

Pdfy Htb - Writeup Upd

PDFy is a retired Web challenge on Hack The Box that tests your ability to exploit Server-Side Request Forgery (SSRF) to read local files.

Since the server fetches a URL and renders it into a PDF, you can test if it can access its own internal environment. pdfy htb writeup upd

Since the application blocks direct file:// or localhost inputs, the standard bypass is to host a malicious script on your own server. This script will redirect the wkhtmltopdf engine to the local file you want to read. Step A: Set Up a Redirect Server PDFy is a retired Web challenge on Hack

Now SSH as root:

Escalating Privileges: After gaining an initial foothold on the system through the web application, I needed to escalate my privileges. This involved enumerating the system to find potential vulnerabilities or misconfigurations that could be exploited for privilege escalation. This script will redirect the wkhtmltopdf engine to

Redirect to local file: The script should redirect the requester to the target local file on the HTB server. Use code with caution. Copied to clipboard

The "Aha!" moment occurred when the generated PDF arrived. Inside the document wasn't a webpage, but the raw response from an internal service. By manipulating the SSRF, the researcher could now "read" internal files and services by proxy, effectively turning the PDF generator into a remote file viewer. Key Takeaways for Developers