<- HTB

Interface


12 minutes to read

Interface
Hack The Box. Linux. Medium machine. This machine has a dummy Next.js website that exposes a subdomain in the Content-Security-Policy header. There, we can enumerate third-party dependencies like dompdf. This one is vulnerable to Remote Code Execution. After a lot of enumeration to interact with dompdf, we find a way to get a reverse shell on the system. Then, user root executes a shell script each minute, and the script is vulnerable to command injection, which must be exploited by adding malicious metadata to a temporary file. By chaining these steps, we are able to get a reverse shell as root