OverTheWire Natas Level 4 Walkthrough

Today we're doing level 4 of the Natas series of CTF wargames hosted at:

http://natas4.natas.labs.overthewire.org

As usual we will need to authenticate into this webpage, using the current level of the Natas game (natas4) as the username, and the password we got from the previous level as the password.  Once authenticated, we see this:


It looks like the difficulty of the Natas levels has gone beyond the point where we can solve the levels without other tools.  In this case, we will have to send modified HTTP requests to the natas4 website, which we will do with the OWASP ZAP program.  In this case, the website will only log us in if we are referred to this page by the Natas5 webpage. 

Teaching how to install and configure OWASP ZAP is out of scope for this walkthrough, but there are a lot of tutorials out there that can teach us how to do that.

So we'll start up OWASP ZAP, make sure our web browser is using the correct proxy port, then start intercepting HTTP requests by pressing the red button the in ZAP like the screenshot below.


Then go back to our webpage with Natas4 and refresh the page.

This starts the following prompt from ZAP:


Here, we want to edit our HTTP request header to the Natas4 website and add a line that indicates we're being referred to the webpage by Natas5 like so:


Then we pass the rest of the HTTP requests through by pressing the arrow button indicated in the above screenshot.  Next, we go back to our Natas4 webpage to see if we logged in successfully or not.


Summary

Natas4 will not log us in unless it receives an HTTP request that contains a referrer string from the Natas5 webpage in the header.  We were able to edit our HTTP request to the page using OWASP ZAP, and after sending the modified HTTP request, we were able to log in and receive the password for Natas5.

Finish












Comments

Popular posts from this blog

TryHackMe - Windows PrivEsc - Walkthrough

TryHackMe - Reversing Elf - Walkthrough

TryHackMe - XSS - Walkthrough