Posts

Showing posts with the label leviathan

OverTheWire[.com] Leviathan Walkthrough - JUST HINT, NO SPOILERS

game portal: http://overthewire.org/wargames/leviathan/ PASSWORDS for each level are stored in /etc/leviathan_pass/leviathanX Leviathan The Leviathan game is about basic debug/hack/trace binary files in linux, and how to exploit them. The main tool you will be using here is ltrace , so read & google about it. Use it in ALL levels except Level 0, even if i don't mention it. Another important note is that most of the files have the " s " flag in their permissions, meaning they run in elevated privileges, and that's important to understand the solutions. Go read about that too. Level 0: Bookmarks bookmarks.html is the file chrome creates when you export all your bookmarks, people can save sensitive info there. Level 1: Introduction to " ltrace " Time to use " ltrace ". Level 2: Exploiting " cat " Most of the tutorials out there are out of date, exploiting symbolic links, and exploit " cat ". You can stil...

leviathan level 2 overthewire - updated challenge

leviathan 2 overthewire setreuid(12002, 12002) start by making a folder with our "mktemp -d" , make a file, and ltrace ./printfile <your file> most tutorials will show you how to get this done with a link file, which are good tutorials and test cases as they are, read them. trying that...  INSIDE our tmp folder ln -s /etc/leviathan_pass/leviathan3 /tmp/tmp.ydhTgRu2oq/b ltrace ~/printfile /tmp/tmp.ydhTgRu2oq/a\ b will output system("/bin/cat /tmp/tmp.ydhTgRu2oq/a b"...1 /bin/cat: b: Permission denied this is because these 2 lines geteuid()  setreuid(12002, 12002)  but, i guess that was not the hack, and in the end we see that the final line executing is anyway, like above or doing just a file named " a b " and another named " b " will output system("/bin/cat /tmp/tmp.ydhTgRu2oq/a b"...1 /bin/cat: b: No such file or directory the important thing " cat " command did try to concat. but to the real hack...