CTF-PWN

Ubuntu 运行i386程序

  • Ubuntu运行32位的程序需要增加libc
    1
    2
    3
    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install zlib1g:i386 libstdc++6:i386 libc6:i386

GDB 工具

pwngdb

  • 安装
    1
    2
    3
    git clone https://github.com/pwndbg/pwndbg
    cd pwndbg
    sudo ./setup.sh

gdb-peda

  • 安装
    1
    2
    3
    git clone https://github.com/longld/peda.git ~/Documents/peda
    echo "source ~/Documents/peda/peda.py" >> ~/.gdbinit
    echo "DONE! debug your program with gdb and enjoy"

gdb-gef

  • 安装
    1
    2
    3
    4
    5
    6
    7
    # via the install script
    #下载 `gef.sh` 并执行
    wget -q -O- https://github.com/hugsy/gef/raw/master/gef.sh | sh

    # 下载 `gef.py`, 并将其 `source` 写入 `.gdbinit`
    wget -q -O ~/.gdbinit-gef.py https://github.com/hugsy/gef/raw/master/gef.py
    echo source ~/.gdbinit-gef.py >> ~/.gdbinit

Pwntools

Pwntools 作为ctf的一个重要工具,在构建payload,与服务器交互等有着重要作用

  • 安装pwntools:

    1
    pip install pwntools
  • 注意如果安装出错可以考虑更换安装源

  • 如果pip install --upgrade pwntools提示warning版本过时,可以用pip install pwntools更换

ROPgadget

  • 安装

    1
    2
    3
    git clone https://github.com/JonathanSalwan/ROPgadget.git
    cd ROPgadget
    sudo python setup.py install
  • 使用:ROPgadget --binary bof-ret2libc --only "pop|ret"

LIBcSearcher

  • git clone https://github.com/lieanu/LibcSearcher.git
  • cd LibcSearcher
  • python setup.py develop

Comments

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×