Level 6 Username : leviathan6 Password : Tith4cokei SSH leviathan.labs.overthewire.org:2223
To solve this level, we first ssh into the leviathan6 server using the credentials provided above.
As we can see, the server contains an executable which requires a 4 digit code and probably compares it with something. If the number matches what the executable expects, we will hopefully be able to access our password file. Let’s run gdb on the executable to learn more about it. The application uses function atoi() and then compares the value returned with our input. If we can learn the number, we can enter the same number and allow the executable to proceed further.
As we can see, the number is 7123. Let’s see what happens if we use that number in the argument.
As we can see, the executable logs us in as leviathan7 and now we can access the password file.
Level 7 Username : leviathan7 Password : ahy7MaeBo9 SSH : leviathan.labs.overthewire.org:2223