OverTheWire: Leviathan Level 4

This is going to be a walkthrough of the 4th level of the Leviathan OverTheWire wargame and so to begin, we need to SSH into the remote host. If you haven’t gotten the password, you can read my walkthrough of the last level.

Username: leviathan3
Password: Ahdiemoo1j

Doing a list of the files in the home directory.

We see an executable file called level3. So let’s run the file and see if it gives us any usage information.

It doesn’t give us any information but asks us to enter in a password. I am just going to type in password and see what other information it prints out.

And it let’s us know that we entered in the wrong password. We can use the same trick as the Level 2 by using the ltrace command to see if it executes any commands we can see. I am going to be typing in the same password as my password.

We see that it compares a couple of strings before asking us what our password is. Then it compares what we entered with the string snlprintf before letting us know that our password was wrong. So let’s try the command again with snlprintf as our password and see what happens.

And it appears that it worked and we have obtained a shell on the machine as the leviathan4 user. So we can open the password file in the password folder which gives us vuH0coox6mas the password for the next level.

To continue, please read my Leviathan 5 walkthrough. Level 5

Thank you for reading. :+1: