<- HTB

Bagel


16 minutes to read

Bagel
Hack The Box. Linux. Medium machine. This machine has website that is vulnerable to Local File Read. With this, we can read the web application source code and see that there is a WebSocket server that uses C# .NET with a DLL to process the messages. We can download and reverse the DLL to read the C# source code. The program deserializes JSON data and there is a flaw that allows us to reuse a class of the codebase to read arbitrary files from the server. With this, we can read the private SSH key of a user, and then switch to another user with a password that is also stored in the DLL. This user is able to run dotnet with sudo, which can be used to escalate privileges