ubuntu 18 CTF 环境搭建
一、换源
-
sudo gedit /etc/apt/sources.list
-
将下面的内容替换文件内容
# 中科大源 deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
-
更新源
sudo apt-get update
-
更新安装包
sudo apt-get upgrade
二、vim 加载 python插件
-
创建相关的工作目录
mkdir ~/.vim mkdir ~/.vim/bundle cd ~/.vim/bundle git clone https://github.com/rkulla/pydiction.git
-
拷贝Pydiction到.vim目录
cp -r ~/.vim/bundle/pydiction/after/ ~/.vim
-
编写相关的配置文件
vim ~/.vimrc
-
将下面的内容复制粘贴
filetype plugin on let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict' let g:pydiction_menu_height = 3
-
三、pwndbg等调试插件安装
-
Pwndbg
https://github.com/pwndbg/pwndbg
-
peda github地址
四、pwntools安装
-
python2
$ apt-get update $ sudo add-apt-repository universe $ sudo apt install -y python2 $ curl https://bootstrap.pypa.io/get-pip.py --output get-pip.py $ sudo python2 get-pip.py $ apt-get install python python-pip python-dev git libssl-dev libffi-dev build-essential $ python2 -m pip install --upgrade pip==20.3.4 $ python2 -m pip install --upgrade pwntools
-
python3
$ apt-get update $ apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential $ python3 -m pip install --upgrade pip $ python3 -m pip install --upgrade pwntools
五、onegadget、Rop等脚本安装
-
One gadget
https://github.com/david942j/one_gadget
-
Rop gadget
https://github.com/JonathanSalwan/ROPgadget
-
推荐采用第二种方式安装,直接通过命令行使用
git clone https://github.com/JonathanSalwan/ROPgadget.git cd ROPgadget sudo python setup.py install
-
六、tmux使用
-
安装
sudo apt-get install tmux
-
分屏
- 先
ctrl b
,后%
- 先
-
复制
shift
选中后 复制
-
鼠标切换窗口
#ctrl + b之后,输入
set -g mouse on