栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

kali系统&pwn基础环境搭建

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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


再次运行 即可发现可以正常去运行了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/922992.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号