Author Archive for snake

15
Aug
09

hack this site basic 11

In this 11th mission we are dealing with a miss configured music website, by appending “index.php” to the URL you get a page that asks you to enter the correct password that we don’t have … yet.

One thing that you may have noticed is that whenever you refresh the page you get a new song name, this may seem random but it’s not and with a little bit of googling you’ll notice that these songs were performed by elton john. Now that we know that, we have to find how the music collection is organized on the server, after many tries I found that the songs are organized in letter by letter directories, trying all the different possibilities is a waste of time because we already know where to look for our password, it’s in http://www.hackthissite.org/missions/basic/11/e/l/t/o/n/ but when you get there, this directory may seem empty, but actually it’s not, there is a hidden file in it and it’s named “.htaccess“, this file allows a directory level configuration of the web server (In this case Apache).  When you open the .htaccess file you’ll see this interesting instruction:
IndexIgnore DaAnswer.* .htaccess

this tells to the web server to exclude these two files from the directory listing. Now we know that our password in the “DaAnswer” file, when you open the file you’ll get something like

The answer is easy! Just look a little harder.

You have to take it literally, cause in this case the answer is “easy” (without the quotes), now go to the index.php, submit your anwser and the “go on” link will appear, you have completed the 11th basic mission.

06
Jul
09

hack this site basic 10

For this 10th basic mission, Sam has used a more “hidden” approach to authenticate users. since viewing the source is a dead end, I tried another approach which is to view the HTTP request headers using Live HTTP headers which is another, very useful firefox addon (grab it here), I could also have used Tamper data for that. Anyway, after monitoring the headers I’ve found an insteresting thing as shown here:

Live HTTP headers

Live HTTP headers

As you can see, it’s an interesting information that we got here, we know that Sam is using a cookies based authentication method this time. We know this, now what?.

Now we must change the value of the cookie named “level10_authorized” to “yes”, and to do this, you can use raw Javascript or use a firefox addon such as tamper data, firebug,etc…

We will do it in raw JavaScript: while on the 10th mission webpage enter this JavaScript code in the address bar:

javascript:function a(){document.cookie="level10_authorized=no";}a();

Now click on the submit button, Congratz, you’ve completed the 10th mission

05
Jul
09

Hack This Site basic 9

To solve this challenge you must know Directory traversal, SSI and *nix directory structure. In this mission Sam screwed up somewhere when he was trying to limit the use of SSI to the level 8 only, this is a big spoiler on how you should proceed to achieve this mission, in other words you have to use Sam’s daughter script once again to find the hidden file containing the password.

Back in the previous mission, we know that the file that is supposed to containt our name is stored in this directory “/var/www/hackthissite.org/html/missions/basic/8/tmp/” and we got the directory listing of “/var/www/hackthissite.org/html/missions/basic/8/” with this command <!–#exec cmd=”ls ..”–> where the two dots mean: one level up. What we need to do is to climb another level up (/var/www/hackthissite.org/html/missions/basic/) and list the content of the folder named “9″ (/var/www/hackthissite.org/html/missions/basic/9/)  where the file containing the password is, the SSI command will be “<!–#exec cmd=”ls ../../9/”–>” once you submit this, you will get the name of the file containing the password. Once done, append it to this address “http://www.hackthissite.org/html/missions/basic/9/” (ex: http://www.hackthissite.org/html/missions/basic/9/p91e283zc3.php) and navigate to it, here you got your password ;) .

05
Nov
08

How to install Nvidia Drivers On Debian

Since this is my first post within the Linux category I wanted to show you how to install Nvidia’s proprietary drivers on your Linux system, since this is the first thing I do after installing my Debian. Now let’s start by downloading the latest drivers from nVidia’s website at this address : http://www.nvidia.com/Download/index.aspx?lang=en-us choose your operating system (Linux 32 bits or x64).

When the download is over, open a Terminal window and enter the following commands as a root (let’s assume that your downloaded file is in “/home/<your user name>/downloads/”) :

$ cd /home/<your user name>/downloads/  //this will change the working directory to the one where our downloaded file is.
$ chmod u+x NVIDIA-Linux-x86-173.14.05-pkg1.run //this will make the script based installer executable
$ init 3 //Sets the current run level to 3
$ /etc/init.d/gdm stop //stops the X server (if the x server was not stopped when switching the 3rd run level) if you are using KDE type "kdm" instead of "gdm".
$ ./NVIDIA-Linux-x86-173.14.05-pkg1.run //runs the installer. just follow the instructions. Accept when prompted to run the xconfig tool
$ /etc/init.d/gdm start //starts the X server

if the installation completed successfully you should see nVidia’s logo at startup.