gdb windbg and od use
gdb
- aslr -- 显示/设置 gdb 的 ASLR
- asmsearch -- Search for ASM instructions in memory
- asmsearch "int 0x80"
- asmsearch "add esp, ?" libc
- assemble -- On the fly assemble and execute instructions using NASM
- assemble
- assemble $pc
> mov al, 0xb
> int 0x80
> end - checksec -- 检查二进制文件的安全选项
- cmpmem -- Compare content of a memory region with a file
- cmpmem 0x08049000 0x0804a000 data.mem
- context -- Display various information of current execution context
- context_code -- Display nearby disassembly at $PC of current execution context
- context_register -- Display register information of current execution context
- context_stack -- Display stack of current execution context
- context reg
- context code
- context stack
- crashdump -- Display crashdump info and save to file
- deactive -- Bypass a function by ignoring its execution (eg sleep/alarm)
- deactive setresuid
- deactive chdir
- distance -- Calculate distance between two addresses
- dumpargs -- 在调用指令停止时显示传递给函数的参数
- dumpmem -- Dump content of a memory region to raw binary file
- dumpmem libc.mem libc
- dumprop -- 在特定的内存范围显示 ROP gadgets
- dumprop
- dumprop binary "pop"
- eflags -- Display/set/clear/toggle value of eflags register
- elfheader -- 获取正在调试的 ELF 文件的头信息
- elfheader
- elfheader .got
- elfsymbol -- 从 ELF 文件中获取没有调试信息的符号信息
- elfsymbol
- elfsymbol printf
- gennop -- Generate abitrary length NOP sled using given characters
- gennop 500
- gennop 500 "\x90"
- getfile -- Get exec filename of current debugged process
- getpid -- Get PID of current debugged process
- goto -- Continue execution at an address
- help -- Print the usage manual for PEDA commands
- hexdump -- Display hex/ascii dump of data in memory
- hexdump $sp 64
- hexdump $sp /20
- hexprint -- Display hexified of data in memory
- hexprint $sp 64
- hexprint $sp /20
- jmpcall -- Search for JMP/CALL instructions in memory
- jmpcall
- jmpcall eax
- jmpcall esp libc
- loadmem -- Load contents of a raw binary file to memory
- loadmem stack.mem 0xbffdf000
- lookup -- 搜索属于内存范围的地址的所有地址/引用
- lookup address stack libc
- lookup pointer stack ld-2
- nearpc -- Disassemble instructions nearby current PC or given address
- nearpc 20
- nearpc 0x08048484
- nextcall -- Step until next 'call' instruction in specific memory range
- nextcall cpy
- nextjmp -- Step until next 'j*' instruction in specific memory range
- nextjmp
- nxtest -- Perform real NX test to see if it is enabled/supported by OS
- patch -- 使用字符串/十六进制字符串/整形数
- patch $esp 0xdeadbeef
- patch $eax "the long string"
- patch (multiple lines)
- pattern -- 生成,搜索或写入循环 pattern 到内存
- pattern_arg -- Set argument list with cyclic pattern
- pattern_create -- Generate a cyclic pattern
- pattern_env -- Set environment variable with a cyclic pattern
- pattern_offset -- Search for offset of a value in cyclic pattern
- pattern_patch -- Write a cyclic pattern to memory
- pattern_search -- Search a cyclic pattern in registers and memory
- pattern create 2000
- pattern create 2000 input
- pattern offset $pc
- pattern search
- pattern patch 0xdeadbeef 100
- payload -- Generate various type of ROP payload using ret2plt
- payload copybytes
- payload copybytes target "/bin/sh"
- payload copybytes 0x0804a010 offset
- pdisass -- Format output of gdb disassemble command with colors
- pdisass $pc /20
- pltbreak -- Set breakpoint at PLT functions match name regex
- pltbreak cpy
- procinfo -- 显示调试进程的 /proc/pid/
- procinfo
- procinfo fd
- profile -- Simple profiling to count executed instructions in the program
- pyhelp -- Wrapper for python built-in help
- pyhelp peda
- pyhelp hex2str
- pshow -- 显示各种 PEDA 选项和其他设置
- pshow
- pshow option context
- pset -- 设置各种 PEDA 选项和其他设置
- pset arg '"A"*200'
- pset arg 'cyclic_pattern(200)'
- pset env EGG 'cyclic_pattern(200)'
- pset option context "code,stack"
- pset option badchars "\r\n"
- readelf -- 获取 ELF 的文件头信息
- readelf libc .text
- refsearch -- Search for all references to a value in memory ranges
- refsearch "/bin/sh"
- refsearch 0xdeadbeef
- reload -- Reload PEDA sources, keep current options untouch
- ropgadget -- 获取二进制或库的常见 ROP gadgets
- ropgadget
- ropgadget libc
- ropsearch -- 搜索内存中的 ROP gadgets
- ropsearch "pop eax"
- ropsearch "xchg eax, esp" libc
- searchmem|find -- 搜索内存中的 pattern; 支持正则表达式搜索
- find "/bin/sh" libc
- find 0xdeadbeef all
- find "..\x04\x08" 0x08048000 0x08049000
- searchmem -- Search for a pattern in memory; support regex search
- session -- Save/restore a working gdb session to file as a script
- set -- Set various PEDA options and other settings
- set exec-wrapper ./exploit.py
- sgrep -- Search for full strings contain the given pattern
- shellcode -- 生成或下载常见的 shellcode
- shellcode x86/linux exec
- show -- Show various PEDA options and other settings
- skeleton -- 生成 python exploit 代码模板
- skeleton argv exploit.py
- skipi -- Skip execution of next count instructions
- snapshot -- Save/restore process's snapshot to/from file
- snapshot save
- snapshot restore
- start -- Start debugged program and stop at most convenient entry
- stepuntil -- Step until a desired instruction in specific memory range
- stepuntil cmp
- stepuntil xor
- strings -- Display printable strings in memory
- strings
- strings binary 4
- substr -- Search for substrings of a given string/number in memory
- telescope -- Display memory content at an address with smart dereferences
- telescope 40
- telescope 0xb7d88000 40
- tracecall -- Trace function calls made by the program
- tracecall
- tracecall "cpy,printf"
- tracecall "-puts,fflush"
- traceinst -- Trace specific instructions executed by the program
- traceinst 20
- traceinst "cmp,xor"
- unptrace -- Disable anti-ptrace detection
- unptrace
- utils -- Miscelaneous utilities from utils module
- vmmap -- 在调试过程中获取段的虚拟映射地址范围
- cmmap
- vmmap binary / libc
- vmmap 0xb7d88000
- waitfor -- Try to attach to new forked process; mimic "attach -waitfor"
- waitfor
- waitfor myprog -c
- xinfo -- Display detail information of address/registers
- xinfo register eax
- xinfo 0xb7d88000
- xormem -- 用一个 key 来对一个内存区域执行 XOR 操作
- xormem 0x08049000 0x0804a000 “thekey”
- xprint -- Extra support to GDB's print command
- xrefs -- Search for all call/data access references to a function/variable
- xuntil -- Continue execution until an address or function
OD
- Ctrl+F1:打开与所选行内符号相关的 API 帮助文档。
- F2:在光标选定位置按 F2 键设置或取消断点。
- Shift+F2:在首个选择命令设置条件断点。
- Ctrl+F2:重新启动被调试程序。
- F4:运行到光标选定位置处暂停。
- Shift+F4:设置记录断点。
- F5:最大化当前窗口。
- Ctrl+F5:打开与首个选择的命令相对应的源文件。
- Alt+F5:让 OllyDbg 窗口总在最前面。
- F6:切换到下一个窗口。
- Shift+F6:切换到前一个窗口。
- F7:单步步入:每次执行一条指令,遇到 call 等子程序时进入其中。
- Shift+F7:与 F7 相同,但当被调试程序发生异常而中止时,调试器首先尝试步入被调试程序指定的异常处理。
- Ctrl+F7:自动步入,在所有的函数调用中一条一条地执行命令。
- Alt+F7:转到上一个找到的参考。
- F8:单步步过,每次执行一条指令,遇到 call 等子程序时不进入其中。
- Shift+F8:与 F8 相同,但当被调试程序发生异常而中止时,调试器首先尝试步过被调试程序指定的异常处理。
- Ctrl+F8:自动步过,一条一条执行命令,但不进入函数内部调用。
- Alt+F8:转到下一个找到的参考。
- F9:运行,被调试软件继续运行,直到遇到下一个断点。
- Shift+F9:与 F9 相同,但当被调试程序发生异常而中止时,调试器首先尝试执行被调试程序指定的异常处理。
- Ctrl+F9:执行到返回,在执行到一个 ret 指令时暂停,常用于从当前函数快速返回到上一个函数。
- Alt+F9:执行到用户代码,可用于从系统部分快速返回到被调试程序部分。
- F10:打开与当前窗口或面板相关的快捷菜单。
- Ctrl+F11:Run 跟踪步入,一条一条执行命令,进入子函数调用,并把寄存器信息加入到 Run 跟踪的存储数据中。
- F12:停止执行,暂停所有线程。
- Ctrl+F12:Run 跟踪步过,一条一条执行命令,不进入子函数调用,并把寄存器信息加入到 Run 跟踪的存储数据中。
- Alt+F3:关闭当前窗口。
- Alt+B:显示断点窗口。
- Alt+C:显示 CPU 窗口。
- Alt+E:显示模块列表。
- Alt+K:显示调用栈。
- Alt+L:显示日志窗口。
- Alt+M:显示内存窗口。
- Alt+O:显示选项对话框。
- Alt+Backspace:撤销对所选部分的修改。
- Ctrl+A:分析当前模块的代码段。
- Ctrl+B:开始二进制搜索。
- Ctrl+E:以十六进制格式编辑所选内容。
- Ctrl+F:开始命令搜索。
- Ctrl+G:转到某地址。
- Ctrl+J:列出所有的涉及到该位置的调用和跳转。
- Ctrl+K:查看与当前函数相关的调用树。
- Ctrl+L:搜索下一个。
- Ctrl+N:打开当前模块的名称列表。
- Ctrl+O:扫描对象文件。
- Ctrl+P:显示补丁窗口。
- Ctrl+R:搜索所选命令的参考。
- Ctrl+S:命令搜索。
- Ctrl+T:打开“暂停Run跟踪”对话框。
- Esc:停止自动执行或跟踪。
- Enter:将选中的命令添加到命令历史,如果当前命令是一个跳转或者函数,则进入到目的地址。
- Backspace:如果分析器将代码误识为数据,可以将选中部分的自动分析信息移除。
- *:转到原始位置
- Ctrl+*:指定新的起始位置。
- +:如果 Run 跟踪没有激活,则根据历史命令跳到下一条运行过命令的地方;否则跳到 Run 跟踪的下一个记录。
- Ctrl++:跳到前一个函数的开始处。
- -:如果 Run 跟踪没有激活,则根据历史命令跳到前一条运行过命令的地方;否则跳到 Run 跟踪的前一个记录。
- Ctrl+-:跳到下一个函数的开始处。
- Space:修改命令。
- ::添加标签。
- ;:添加注释。
- windbg
- F10:单步步过F11:
- 单步步入Shift+F11:跳出当前函数
- 调试
t
:单步步入p
:单步步过- 执行
g [addr|func]
:执行到指定位置gh [addr|func]
:执行到指定位置,遇到异常时中断gn [addr|func]
:执行到指定位置,遇到异常时忽略- 断点
bl
:列出已设置的断点be [ID]
:激活断点bd [ID]
:禁用断点bc [ID]
:清除断点bp [addr|func]
:设置断点
- 数据显示
d [addr]
:显示内存数据db [addr]
:按字节模式显示dd [addr]
:按双字模式显示dD
:按双精度浮点数显示da
:按 ASCII 显示du
:按 Unicode 显示ds
:按字符串显示dt
:套用已知的数据结构模板显示
- 数据编辑
e [addr] [data]
:修改任意地址内存的值eb [addr] [data]
:以字节写入ed [addr] [data]
:以双字写入ea [addr] [data]
:以 ASCII 字符写入eu [addr] [data]
:以 Unicode 字符写入
- 栈帧显示
k [x]
:由栈顶开始列出当前线程中的栈帧,x 为需要回溯的栈帧数kb [x]
:可以额外显示 3 个传递给函数的参数
- 寄存器显示
r [reg]
:显示指定寄存器的值
- 模块显示
lm
:列出当前已经读入的所有模块
- 反汇编
u
:反汇编当前指令后的几条指令u [start]
:从指定位置开始反汇编u [start] [end]
:反汇编指定地址区间
gdb windbg and od use的更多相关文章
- IDA+Windbg IDA+OD 连动调试插件
https://github.com/bootleg/ret-sync 使用注意事项:多次测试,最好现在IDA中启动,然后再在OD或WINDBG(.load sync)中启动. 这个工具还是相当给力的 ...
- 为异常处理做准备,熟悉一下WinDbg工具
为异常处理做准备,熟悉一下WinDbg工具 马上开始异常处理第二讲,但是在讲解之前,还有熟悉一下我们的WinDbg工具,当然你如果熟悉这个工具,那么就可以不用看了. 一丶熟悉WinDbg界面 刚开始打 ...
- 反编译与调试APK
0×01前言 这年头,apk全都是加密啊,加壳啊,反调试啊,小伙伴们表示已经不能愉快的玩耍了.静态分析越来越不靠谱了,apktool.ApkIDE.jd GUI.dex2jar等已经无法满足大家的需求 ...
- 解密所有APP运行过程中的内部逻辑(转)
转贴地址:http://www.freebuf.com/tools/54562.html 0×01前言 这年头,apk 全都是加密啊,加壳啊,反调试啊,小伙伴们表示已经不能愉快的玩耍了.静态分析越来越 ...
- APK程序Dex文件无源码调试方法讨论
那些不靠谱的工具 先来说说那些不靠谱的工具,就是今天吭了我小半天的各种工具,看官上坐,待我细细道来.IDA pro IDA pro6.6之后加入了dex动态调试功能,一时间普天同庆.喜大普奔.兴奋之后 ...
- cve-2017-11882 poc分析
目录 CVE-2017-11882 poc分析 0x00 工具&实验环境 0x01 分析行为 第一步:观察poc行为 第二步:找出计算器被弹出的地方 0x02 调试定位漏洞触发点 0x03 分 ...
- CVE-2015-1641 Office类型混淆漏洞及shellcode分析
作者:枕边月亮 原文来自:CVE-2015-1641 Office类型混淆漏洞及shellcode分析 0x1实验环境:Win7_32位,Office2007 0x2工具:Windbg,OD,火绒剑, ...
- 过 DNF TP 驱动保护(一)
过 DNF TP 驱动保护(一) 文章目录: 01. 博文简介: 02. 环境及工具准备: 03. 分析 TP 所做的保护: 04. 干掉 NtOpenProc ...
- GDB 和 windbg 命令对照(转载)
From:http://blog.csdn.net/joeleechj/article/details/10020501 命令 ...
随机推荐
- django-admin的源码流程
一.admin的源码流程 首先可以确定的是:路由关系一定对应一个视图函数 a.当点击运行的时候,会先找到每一个app中的admin.py文件,并执行 b.执行urls.py admin.site是什么 ...
- 3790:最短路径问题(HDU)
Problem Description 给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的. Inp ...
- ignitius and princess 2(全排列)
A - Ignatius and the Princess II Now our hero finds the door to the BEelzebub feng5166. He opens the ...
- LeetCode(108):将有序数组转换为二叉搜索树
Easy! 题目描述: 将一个按照升序排列的有序数组,转换为一棵高度平衡二叉搜索树. 本题中,一个高度平衡二叉树是指一个二叉树每个节点 的左右两个子树的高度差的绝对值不超过 1. 示例: 给定有序数组 ...
- sql查询条件为空的另类写法o( ̄▽ ̄)d
简单描述:今天看老大提交的代码,发现了一个有意思的事情,一条sql中判断条件是空,老大的写法,让我眼前一亮.直接上代码 代码: <select id="getxxxs" re ...
- C#概念总结(一)
1.C#程序的框架问题 首先是命名的空间申明 (NameSpace delclaration) 一个 ClASS class 方法 class属性 一个main 的方法 语句(Statement) ...
- javaSocket笔记
1.查看电脑当前开放链接的端口号 使用netstat命令 netstat -nao 可以查看PID进程号 netstat -nab 获取进程的详细信息 2.类创建的不同对象,引用是不同的.也就是说同一 ...
- 浏览器URL中 encodeURIComponent()加密和decodeURIComponent()解码
encodeURIComponent()加密 定义和用法 encodeURIComponent() 函数可把字符串作为 URI 组件进行编码. 语法 encodeURIComponent(URIstr ...
- Python if __name__ == '__main__':(以主程序形式执行)
在外部调用某个模块时,可能会将只能在本模块执行的代码给执行了,有没有什么办法让某些特定的代码指定只能在自身运行时才执行被调用时不执行呢?使用if __name__ == '__main__':. 示例 ...
- JumpServer里的sftp功能报错说明
JumpServer里sftp默认的家目录是/tmp下 修改默认家目录: vim /usr/local/coco/coco/sftp.py class SFTPServer(paramiko.SFTP ...