pwn基本环境搭建

或许有后人搭建环境 同时自己重新配环境也方便 就写一下吧

ps:os下载还是用中科大源快啊

或许有后人搭建环境 同时自己重新配环境也方便 就写一下吧

ps:os下载还是用中科大源快啊

解决分辨率问题

sudo apt-get install open-vm-tools-desktop fuse(同时解决vmtools)

sudo apt-get install open-vm-tools

sudo apt-get install open-vm*

后面发现holk师傅也写过https://blog.csdn.net/qq_41202237/article/details/118188924

首先是pwngdb+pwndbg还有gef

1
2
3
4
5
6
7
cd ~/
git clone https://github.com/scwuaptx/Pwngdb.git
cp ~/Pwngdb/.gdbinit ~/

git clone https://github.com/pwndbg/pwndbg
cd pwndbg
./setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
cd ..
wget -O ~/.gdbinit-gef.py -q https://gef.blah.cat/py
echo source ~/.gdbinit-gef.py >> ~/.gdbinit


gedit ~/.gdbinit
改成这样
#source ~/peda/peda.py
source /home/pwnme/.gdbinit-gef.py
#source ~/pwndbg/gdbinit.py
#source ~/Pwngdb/pwngdb.py
source ~/Pwngdb/angelheap/gdbinit.py
define hook-run
python
import angelheap
angelheap.init_angelheap()
end

pwntools安装(python3)

1
2
3
4
5
6
7
8
9
10
11
sudo apt-get install gcc 
git clone https://github.com/aquynh/capstone
cd capstone
make
make install

sudo apt-get update
sudo apt-get install python3 python3-pip python3-dev git libssl-dev libffi-dev build-essential
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install --upgrade pwntools

LibcSearcher安装

1
pip3 install LibcSearcher

ROPgadget

1
2
3
4
5
6
7
sudo apt-get install python-capstone

git clone https://github.com/JonathanSalwan/ROPgadget.git

cd ROPgadget

sudo python3 setup.py install

这里可能会报一个错

image-20220301162034956

直接cp过去该路径就好了

image-20220301162049315

Ropper

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
keystone-engine

$ git clone https://github.com/keystone-engine/keystone.git
$ cd keystone
$ mkdir build
$ cd build
$ ../make-share.sh
$ sudo make install
$ sudo ldconfig
$ cd ../bindings/python
$ sudo make install3 # or sudo make install for python2-bindings

Ropper

sudo pip3 install filebytes==0.9.18
git clone https://github.com/sashs/Ropper.git
cd Ropper
sudo python3 setup.py install

onegadget

1
2
3
sudo apt -y install ruby
sudo gem install one_gadget

注意 onegadget可以使用 –level=2 来查找更多的gadget

seccomp-tools

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

image-20220208173233016

glibc all in one

https://blog.csdn.net/qq_41560595/article/details/114597342

1
2
3
 sudo apt-get install autoconf automake libtool
git clone https://github.com/NixOS/patchelf
git clone https://github.com/matrix1001/glibc-all-in-one
1
2
3
4
5
6
7
8
9
10
cd glibc all in one
python3 update_list

cd patchelf
sh bootstrap.sh
./configure
make
sudo make install
make check

arm

1
2
3
4
5
6
7
8
9
10
11
sudo apt-get install qemu-user qemu-system 

sudo apt-get install gdb-multiarch

软件包

sudo apt-get install gcc-arm-linux-gnueabi

sudo apt-get install gcc-aarch64-linux-gnu


mips

1
2
3
4
sudo apt-get install gcc-mips-linux-gnu
sudo apt-get install gcc-mipsel-linux-gnu
sudo apt-get install gcc-mips64-linux-gnuabi64
sudo apt-get install gcc-mips64el-linux-gnuabi64

sublime

http://www.sublimetext.com/3 下载

解压后

1
sudo mv sublime_text_3 /opt/ 

在 /usr/bin/ 下创建链接:

1
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/sbl

配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{
// 保存时自动把tab转换成空格
"expand_tabs_on_save": true,
// 默认字体大小
"font_size": 12.0,
// Tab 替换为 4 个空格
"tab_size": 4,
// Tab 转换为空格
"translate_tabs_to_spaces": true,
// 不允许更新检查
"update_check": false,
// 自动换行
"word_wrap": "auto",
// 光标移出,则自动保存
"save_on_focus_lost": true,
// 记住之前打开的文件
"remember_open_files": true,
// 退出前,保存提示
"hot_exit": true,
}

主题 material theme

Colorsublime 代码高亮

BracketHighlighter 括号匹配

首选项->Package Settings->BracketHighlighter->bracket settings; 将左侧复制,粘到User中,将原先大概690行的代码更改

1
2
"color": "region.yellowish brackethighlighter.entity.name.class",
"style": "highlight"

zsh

1
2
3
4
5
6
7
8
sudo apt-get install -y zsh

chsh -s /bin/zsh

wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh



nerd font 字体

1
2
3
4
5
6
7
8
wget -c https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/SourceCodePro.zip
sudo unzip SourceCodePro -d /usr/share/fonts/SourceCodePro

cd /usr/share/fonts/SourceCodePro
sudo mkfontscale # 生成核心字体信息
sudo mkfontdir # 生成字体文件夹
sudo fc-cache -fv # 刷新系统字体缓存

p10k

1
2
3
4
5
6
7
8
9
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

vim .zshrc
ZSH_THEME="powerlevel10k/powerlevel10k"
source ~/.zshrc



p10k configure

插件

1
2
3
4
5
6
7
8
9
10
11
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting


plugins=(
# other plugins...
zsh-autosuggestions
zsh-syntax-highlighting
z
)

美化

https://blog.csdn.net/FSKEps/article/details/122269118

afl

https://f0cus7.github.io/2022/05/14/fuzz-%E9%80%9A%E8%BF%87afl-training%E5%AD%A6%E4%B9%A0afl/