.debug (prepare and connect to debugger)
Description of the '.debug' command in HyperDbg.
Command
.debug
Syntax
.debug [remote] [serial|namedpipe] [pause] [Baudrate (decimal)] [Address (string)]
.debug [prepare] [serial] [Baudrate (decimal)] [Address (string)]
.debug [close]
Description
This command prepares debuggee for a remote connection or connects to a remote debuggee.
Please note that you should first wait for reconnecting on the debugger, then connect to it in the debuggee.
Parameters
[remote]
If you specify remote
then it means that you want to connect to a debuggee.
[prepare]
If you specify prepare
then it means that you want to prepare the current machine to be debugged as debuggee.
[close]
close
means to close all the connections to the debuggee.
[serial|namedpipe]
If you want to use a serial port as the connection, you should choose serial
, and if you want to connect to a named pipe, then you should specify namedpipe
. Please note that namedpipe
cannot be used in debuggee, and it can be used only in the debugger.
[pause]
In the case of choosing remote
, specifies whether the debuggee should be paused after connection or not. In case you don't specify this argument, it means the debuggee won't be paused (halted) upon connection.
[serial]
In the case of choosing prepare
, only serial
is supported as the type of connection.
[Baudrate (Decimal)]
This value shows the baud rate of the device. (See Remarks for more information)
[Address (string)]
COM port address or named pipe address. (See Remarks for more information)
Examples
If you want to have a kernel debug connection, first, you should run the following command in a debugger (host). As you can see, you can change the com3
to your COM port that is connected to the debuggee.
If you want to use a named pipe instead of a COM port, you can execute the following command in the debugger (Host).
Or if you want to immediately pause debuggee upon connection, you can execute the following command in the debugger (Host). Note that, a pause
is added to the above command.
After you tell the debugger to listen on a COM port or a named pipe, now you can run the following command in the debuggee.
If you want to disconnect from the debuggee, then you should run the following command.
IOCTL
See here to see the design of the kernel debugger connectin.
Remarks
The following values are valid baud rates for serial connections.
The following COM ports are valid for debugging.
Requirements
None
Related
Last updated