使用 Windbg 调试虚拟机

逆向工程 调试器 调试 风袋 虚拟机
2021-06-18 15:57:03

我正在尝试连接到在 Microsoft Virtual PC 下运行的 Windows XP Professional 虚拟机以进行调试。我正在关注MSDN 内核模式调试文章,但是来宾计算机上无法识别 bcdedit 命令,因此我在 C:\ 驱动器下的 boot.ini 文件中添加了以下条目

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="KD" /fastdetect /debug /debugport=2 /baudrate=115200

我将 com2 端口配置为命名管道 (\\.\pipe\pipe2)

我在命令提示符下输入以下命令并开启虚拟机

windbg -k com:pipe,port=\\.\pipe\Pipe2,resets=0,reconnect

我得到以下输出

Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.

Waiting for pipe \\.\pipe\pipe2
Waiting to reconnect...
Connected to Windows XP 2600 x86 compatible target at (Fri May  9 05:34:23.920 2014 (UTC + 5:30)), ptr64 FALSE
Kernel Debugger connection established.
Symbol search path is: C:\Windows\Symbols;srv*C:\Windows\Symbols*http://msdl.microsoft.com/download/symbols
Executable search path is: 
Windows XP Kernel Version 2600 UP Free x86 compatible
Built by: 2600.xpsp_sp3_qfe.100216-1510
Machine Name:
Kernel base = 0x804d7000 PsLoadedModuleList = 0x8055b1c0
System Uptime: not available
56: ERROR: UMRxReadDWORDFromTheRegistry/ZwQueryValueKey: NtStatus = c0000034
ERROR: DavReadRegistryValues/RegQueryValueExW(4). WStatus = 127
ERROR: DavReadRegistryValues/RegQueryValueExW(5). WStatus = 127
ERROR: DavReadRegistryValues/RegQueryValueExW(6). WStatus = 127

底部状态栏显示“被调试者未连接”

我错过了什么吗?

2个回答

自从我使用 Virtual PC 已经有一段时间了,但我记得本指南中的说明运行良好:http : //silverstr.ufies.org/lotr0/windbg-vmware.html

然而,Virtual PC 已经非常过时(7 岁了),现在使用VirtualKD和 VMware 或 VirtualBox进行 VM 内核调试要容易得多

虚拟 pc 说调试器未连接是正常的,因为它尚未
连接到目标,但它刚刚建立了传输

ctrl+break一次连接并按g恢复运行。

正如杰森所建议的那样,获得free vmware player并配置virtualkd一个
更快的调试 com 端口对于许多事情来说太慢了,尤其是条件性日志中断
会使调试器一起停顿几分钟。