环境配置

嚯嚯,一不小心把用了两年的虚拟机删了,现在一切重来!记录一下经常配的环境,下次就不用慢慢想了~

宗旨:颜值即正义

Linux

  1. kali

zsh

1
2
apt-get install zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

ssh

1
2
3
vim /etc/ssh/sshd_config                #root可登陆,允许密码登陆
##echo "service ssh start" >> .zshrc #加入自启动
update-rc.d ssh enable

ccat

1
2
3
4
5
wget https://github.com/jingweno/ccat/releases/download/v1.1.0/linux-amd64-1.1.0.tar.gz
tar xvf linux-amd64-1.1.0.tar.gz
cp linux-amd64-1.1.0/ccat /usr/local/bin
echo 'alias cat=ccat'>>~/.zshrc
rm -rf linux-amd64-1.1.0*

afl

1
2
3
4
5
6
7
8
wget http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz
tar xvf afl-lastest.tgz
cd afl-lastest.tgz
make
make install

cd ~
rm -rf afl-*

vimplus

1
2
3
4
5
6
7
8
git clone https://github.com/chxuan/vimplus.git ~/.vimplus
cd ~/.vimplus
./install.sh
## 若安装失败一般都是youCompleteMe下载失败,可以手动下载 https://pan.baidu.com/s/1-Z_U-eKbkMQqmI03qTzmFw
# tar zxvf YouCompleteMe.tar.gz
# mv YouCompleteMe .vim/plugged
# cd ~/.vim/plugged/YouCompleteMe ##这两步可以不要,再次运行.vimplus/install即可
# ./install.py --clang-completer

libc

1
2
3
apt-get install libc6-dbg
apt-get install source libc6-dev
# 使用 directory 手动加载源码
1
2


multilib

1
apt install gcc-multilib g++-multilib

qira

1
2
3
4
5
cd ~/
git clone https://github.com/BinaryAnalysisPlatform/qira.git
cd qira/
./install.sh
## 若出错 他需要Flask-SocketIO==2.9.1,将requirements.txt文件对应项改掉就行

ipython

1
apt install ipython -y

seccomp-tool

1
2
apt install gcc ruby-dev
gem install seccomp-tools

pwntools

1
2
3
4
apt-get update
apt-get install python2.7 python-pip python-dev git libssl-dev libffi-dev build-essential
pip install --upgrade pip
pip install --upgrade pwntools

tmux

1
apt install tmux

pwngdb与pwndbg

要改变自己,于是尝试熟悉pwndbg,也附上peda的安装:

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

当前的kali最新gdb版本位8.2,与pwndbg不兼容或者说存在bug,于是自己编译了最新版:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
wegt ftp://ftp.gnu.org/gnu/gdb/gdb-8.2.1.tar.gz
tar -xvf gdb-8.2.1.tar.gz
cd gdb-8.2.1
mkdir build
cd build
../configure --prefix=/usr --disable-nls --disable-werror --with-system-readline --with-python=/usr/bin/python3.6 --with-system-gdbinit=/etc/gdb/gdbinit --enable-targets=all
make -j7
make install
# 若报找不到readline可安装:
#wget http://ftp.gnu.org/gnu/readline/readline-8.0.tar.gz
#tar -zxvf readline-8.0.tar.gz
#cd readline-8.0
#./configure
#make
#make install
#ldconfig

对于pwndbg的安装:

1
2
3
4
5
6
7
git clone https://github.com/pwndbg/pwndbg
cd pwndbg
./setup.sh
#若报错找不到python头可以安装
#apt-get install libpython3.7-dev
## 一个扩展
apt install ropper

对pwngdb的安装:

1
2
3
4
cd ~/
git clone https://github.com/longld/peda.git ~/peda
git clone https://github.com/scwuaptx/Pwngdb.git
cp ~/Pwngdb/.gdbinit ~/

整合ida:

1
2
3
# 下载插件
# 删除 ##idc.LineA = LineA
# 设置ida地址

然后要改的就是.gdbinit文件,把peda替换成pwndbg。

Windows

ida

绿色版下载:https://www.52pojie.cn/thread-675251-1-1.html