This is a write-up on the DAMN Vulnerable RESTaurant project on Github. The Goal of this box is to exploit API Vulnerabilities across the OWASP API Top 10.

Installation

The Project is hosted on Github at https://github.com/theowni/Damn-Vulnerable-Restaurant-API-Game and there you will find all the step to install the application on your computer. Below is an image of the repository:-

install.png

Once you're done and all set up, you can start hacking!

Reconnaissance to Root!

As is with any CTF, Penetration Test or engagement the first step is to do a thorough recon. This will help us in identifying the attack surface and map out entry points.

First step, I can see some very interesting endpoints here ones that use ids and some admin endpoints like /admin/stats/disk

Let's try and access the admin endpoint without authentication and also with a normal user account.

recon-1.png

Since that failed, let's try following the flow of the application now and create an account then start digging in.

register.png

authorize-0.png

authorize.png

With that we are able to login and get a token. There exists a couple of attacks on this JWT but ill skip that for now.