|
|
|
|
|
|
|
|
|
|
|
[分享]windbg常用指令
昵称好麻烦 老哥NB,我把以前的一些东西发上去,是防止哪天丢了或者忘了,你指出的这些问题我回家后会一个一个看的,这个笔记我会更新的[em_41]经过再次调试 发现微软官方windbg说 有些命令只能在用户模式执行 不能在内核模式执行 而且用户模式 貌似指的是本地windbg调试 不是双机windbg 断在进程用户空间 也算是内核调试 比如我上面回复的那些不能用的指令 在本地windbg调试的时候 都能用了 双机无论在用户层还是内核层断下来 命令都不行 如果命令支持内核模式 那么双机就可以 |
|
|
|
[分享]windbg常用指令
感谢总结 但是看完后 发现其中一些问题 还请帮忙回复一下 :我的windbg版本是windbg:6.12.0002.633 AMd64 双机调试的操作系统版本是win7x64 6.1.7601 Service Pack 1内部版本7601
1 dt nt!_P* 显示nt模块中所有以_P为开头的结构体的名称
x nt!zw* 显示nt模块内的所有zw开头的函数
那问题来啦 如何显示win32k内 nt开头的函数呢 hal.dll内某些结构呢? 我试了一下 不行啊
2 标注一二三四五六七八 地方 我看不懂 你知道是啥意思吗
!process EPROCESS地址 7 查看进程详细信息 部分显示如下 THREAD fffffa8032424060 Cid 0004.0364 Teb: 0000000000000000 Win32Thread: 0000000000000000 WAIT: (Executive) KernelMode Non-Alertable fffffa80323fce58 SynchronizationEvent 一哪个命令查看谁占用这个事件对象呢? Not impersonating 二这个是啥意思 DeviceMap fffff8a000008bc0 Owning Process fffffa8030ed5040 Image: System Attached Process N/A Image: N/A 三什么是N/A? Wait Start TickCount 3611 四是啥意思 Ticks: 493562 (0:02:08:19.616) 五啥意思? Context Switch Count 1 UserTime 00:00:00.000 六 是啥意思 KernelTime 00:00:00.000 Win32 Start Address nt!EtwpLogger (0xfffff800041f1064) Stack Init fffff880026fcc70 Current fffff880026fc6b0 Base fffff880026fd000 Limit fffff880026f7000 Call 0 Priority 15 BasePriority 15 UnusualBoost 0 ForegroundBoost 0 IoPriority 2 PagePriority 5 七 UnusualBoost ForegroundBoost IoPriority PagePriority 八这四个分别啥意思? Child-SP RetAddr : Args to Child : Call Site fffff880`026fc6f0 fffff800`03eda992 : fffff880`04b660b8 fffffa80`32424060 fffffa80`00000000 00000000`00000000 : nt!KiSwapContext+0x7a fffff880`026fc830 fffff800`03ed9eaa : fffffa80`312bc2c0 fffffa80`315bf102 00000000`00000000 fffff880`04b66390 : nt!KiCommitThreadWait+0x1d2 fffff880`026fc8c0 fffff800`041f1156 : 00000000`00000001 fffff880`026fcbc0 fffffa80`00000001 fffffa80`00000000 : nt!KeWaitForMultipleObjects+0x272 fffff880`026fcb80 fffff800`04172cce : 00000000`812576a0 fffffa80`32424060 00000000`00000080 fffffa80`30ed5040 : nt!EtwpLogger+0xf2 fffff880`026fcc00 fffff800`03ec6fe6 : fffff800`04047e80 fffffa80`32424060 fffff800`04055cc0 fffff880`0126f384 : nt!PspSystemThreadStartup+0x5a fffff880`026fcc40 00000000`00000000 : fffff880`026fd000 00000000`00000000 00000000`00000000 00000000`00000000 : nt!KxStartSystemThread+0x16
3 lmf并没有显示模块路径 如下所示
0: kd> lmf start end module name fffff800`03e55000 fffff800`0443f000 nt ntkrnlmp.exe Unloaded modules: fffff880`15a31000 fffff880`191d6000 34364088.sys fffff880`0374f000 fffff880`037c0000 spsys.sys fffff880`01880000 fffff880`0188e000 crashdmp.sys fffff880`0188e000 fffff880`01898000 dump_storport.sys fffff880`01898000 fffff880`018b5000 dump_LSI_SAS.sys fffff880`01bcc000 fffff880`01bdf000 dump_dumpfve.sys fffff880`05408000 fffff880`0540a000 USBD.SYS fffff880`05400000 fffff880`05408000 USBPcap.sys fffff880`055c5000 fffff880`055c7000 USBD.SYS fffff880`055bd000 fffff880`055c5000 USBPcap.sys
4.lmvm *nt* 显示名字中包含nt的模块的详细信息(注意exe、dll等都不要带后缀名)貌似只能查看内核模块 你这个exe dll是啥意思?
5 !dml_proc和.call
你忘记注释它的用法了 我这里发出来吧: 显示进程列表 第一个是一个进程eproess地址 是个链接 可以点进去详细查看更多信息 第二个是进程id 第三个是进程名字 .call 是调用某个函数 类似于od的远程线程调用call测试一样
6 !gflag +ksl 这一块 你说此时断下来后 进程还没创建呢 内存空间没初始化 所以全是???? 也无法下cc断点 你说需要 ida查看入口 完后去下断点 其实太麻烦了 直接kvn查看堆栈 最后一个用户层的返回地址 下硬断就行了 完后恢复运行 windbg执行完内核函数回到用户层的时候 在syscall后面的ret地址处断下来 此时已经进城创建完毕 内存空间可以查看了
7 .load wow64exts
!sw
这和.effmach x86啥区别?
8 下面这些异常中断分别啥意思啊
.sx 显示所有支持的异常中断 eh - C++ EH exception - second-chance break - not handled clr - CLR exception - second-chance break - not handled clrn - CLR notification exception - second-chance break - handled cce - Control-Break exception - break cc - Control-Break exception continue - handled cce - Control-C exception - break cc - Control-C exception continue - handled
9 下面这些指令(
!address
!gle
!gle -all
!uniqstack
|
|#
~ 等相关命令
)都不能用啊
不管是用户模式还是内核模式 我都尝试过 我也看过微软官方windbg文档 都试过 提示这些乱七八糟的错误
1: kd> !address fffff800`03ecd490 unable to resolve nt!MiSessionViewStart 0: kd:x86> !gle Unable to read thread 0's TEB 0: kd:x86> !gle -all Last error for thread 0: Unable to read thread 0's TEB 0: kd:x86> !uniqstack No export uniqstack found 32.0: kd:x86> |. ^ Extra character error in '|.' 32.0: kd:x86> | 32.0: kd:x86> |# ^ Extra character error in '|#' 32.0: kd:x86> | 32.0: kd:x86> ~ ^ Syntax error in '~' 10:
DebugInfo 和
LockSemaphore 啥意思 kd> !cs ----------------------------------------- DebugInfo = 0x00000000770f7088 啥意思 Critical section = 0x00000000770f7060 (ntdll!RtlCriticalSectionLock+0x0) NOT LOCKED LockSemaphore = 0x0 啥意思 SpinCount = 0x0000000002000000 11 你文章中说道:花指令:无用指令或者干扰指令 你windbg是怎么处理的? 12 我想跟踪进程某段区间内 所有api的调用(包含syscall的调用) 有没有好的脚本 命令 或者啥其他建议? |
操作理由
RANk
{{ user_info.golds == '' ? 0 : user_info.golds }}
雪币
{{ experience }}
课程经验
{{ score }}
学习收益
{{study_duration_fmt}}
学习时长
基本信息
荣誉称号:
{{ honorary_title }}
能力排名:
No.{{ rank_num }}
等 级:
LV{{ rank_lv-100 }}
活跃值:
在线值:
浏览人数:{{ visits }}
最近活跃:{{ last_active_time }}
注册时间:{{ user_info.create_date_jsonfmt }}
勋章
兑换勋章
证书
证书查询 >
能力值