kali系统&pwn基础环境搭建

pwntools安装

python2

sudo pip2 install pwntools -i https://pypi.tuna.tsinghua.edu.cn/simpl

python3

sudo pip3 install pwntools -i https://pypi.tuna.tsinghua.edu.cn/simpl

因为做题过程中可能python2 和 3都会用到 所以这里两个版本我都装上了pwntools
我这里安装过程没有遇到报错 但是因为当时没有安装pip3导致有点小问题

解决pip3 报错

apt install --fix-missing python3-pip

解决之后再用这个命令安装就可以了

sudo pip3 install pwntools -i https://pypi.tuna.tsinghua.edu.cn/simpl

gdb安装

sudo apt install gdb

pwndbg安装(gdb插件)

源地址:https://github.com/pwndbg/pwndbg

手动安装

git clone https://github.com/pwndbg/pwndbg
cd pwndbg
./setup.sh

没啥问题运行gdb的话就可以看到明显的不同了
在这里插入图片描述

没有生效

如果有问题的话就去检查一下自己的家目录中的.gdbinit配置文件(没有的话需要手动创建)

vim ~/.gdbinit

添加上刚才git的文件中的gdbinit.py路径

source /xx/pwndbg/pwndbg-dev/pwndbg-dev/gdbinit.py

在这里插入图片描述
然后source一下

source ~/.gdbinit

再次运行gdb检查效果

因为个人环境问题又出现了新的错误

warning: File "/root/xxx/xxx/dbg/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "/root/.gdbinit".
To enable execution of this file add
	add-auto-load-safe-path /home/xyy/debug_test/base/.gdbinit
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"

将刚才的配置文件再加上一句话即可

set auto-load safe-path /
source /root/桌面/pwndbg/pwndbg-dev/pwndbg-dev/gdbinit.py

在这里插入图片描述
再次运行 即可发现可以正常去运行了
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值