Previous Writeup (HackTheBox Medium Machine)
Overview Previous is a medium Linux machine from HackTheBox. This box takes a lot of patience, enumeration and fuzzing. On the other hand, it has couple very interesting vulnerabilities. We start by discovering Next.js website with Auth bypass vulnerability. We get access to docs and identify LFI. We abuse it to fuzz the filesystem and discover a manifest file and ultimately an auth file with SSH credentials. We use those to get access to the machine. Once inside, we find out that we have specific sudo privilege over Terraform. We create a malicious provider script, trick Terraform into executing it and get the Root shell.