虚拟机pwn环境配置
为防止自己犯病写的虚拟机 pwn 环境配置,大概适用 16.04-18.04
ubuntu18.04 升级到 ubuntu20.04 千万不要选择删除旧软件😅😅😅😅
来源于网上各种教程
# 基本环境
# 更换国内源
- 备份原来的源(一定要备份)
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
- 更换源
sudo gedit /etc/apt/sources.list
- 将下列代码复制进去
# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
- 更新,修复
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
# 安装 Python2
sudo apt install python2.7
# 安装 zsh
- 安装 git
sudo apt-get install git
- 安装 zsh
sudo apt-get install zsh
- 安装 on-my-zsh
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh
chmod +x install.sh
./install.sh
- 配置 zsh
ZSH_THEME="ys"
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
source .zshrc
- 安装插件
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
source .zshrc
- 安装 powerline 字体
git clone https://github.com/powerline/fonts
./install.sh
- 切换默认终端
chsh -s /usr/bin/zsh
# Pwn 环境
# 执行一键安装脚本
wget https://raw.githubusercontent.com/giantbranch/pwn-env-init/master/pwn_init_py2.sh
chmod +x pwn_init_py2.sh
sudo ./pwn_init_py2.sh
# 安装 LibcSearcher
git clone https://github.com/lieanu/LibcSearcher.git
cd LibcSearcher
sudo python setup.py develop
# 安装 Pwndbg、Pwngdb
- 安装 pwndbg、pwngdb
git clone https://github.com/pwndbg/pwndbg
git clone https://github.com/scwuaptx/Pwngdb.git
cd pwndbg
sudo ./setup.sh
- 切换 gdb 默认插件
cd ~
cp ~/Pwngdb/.gdbinit ~/
gedit ~/.gdbinit
source ~/pwndbg/gdbinit.py
source ~/Pwngdb/pwngdb.py
source ~/Pwngdb/angelheap/gdbinit.py
本作品采用 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议 进行许可。