Monday, October 29, 2012

OvertheWire - Natas Wargame Level 7 Writeup

Using the credentials obtained in the previous post, we can log in to Level 7 where we are presented with the following:

Let's start by viewing the source:

 <head><link rel="stylesheet" type="text/css" href=""></head>  
 <div id="content">  
 <a href="index.php?page=home">Home</a>  
 <a href="index.php?page=about">About</a>  
 <!-- hint: password for webuser natas8 is in /etc/natas_webpass/natas8 -->  

We can see a hint hidden in an HTML comment, which tells us the location of the natas8 password. However, we aren't able to simply browse there since it is outside of the web root. Let's keep pressing on to see what we can find. By browsing to the 'About' page, we are presented with the following URL:

Seeing the 'page=about' parameter in the URL reminds us of a previous writeup, in which we were able to leverage an LFI/RFI vulnerability to our advantage. Let's see if this is the case here with a bogus filename:

It looks like this challenge is indeed meant to be solved using an LFI vulnerability. Let's use this to traverse back to the file containing the natas8 password:

As expected, browsing to this URL displays the following:

We can then use this password to log in to the next challenge. Piece of cake so far, right? More writeups to come.



  1. This comment has been removed by the author.

  2. Since /etc is inside the top most folder in regular *nix installations, you can simply the site with: