a (assemble virtual address)
Description of the 'a' command in HyperDbg.
Command
a
Syntax
a [Address (hex)] [asm {AsmCmd1; AsmCmd2}] [pid ProcessId (hex)]
Description
Assembles (shows HEX byte codes) or puts the resulting instruction codes into the (virtual) memory.
Parameters
[Address (hex)] (optional)
The virtual address of where we want to start putting resulting codes into its memory.
[asm {AsmCmd1; AsmCmd2}]
The target assembly codes.
[pid ProcessId (hex)] (optional)
The Process ID that's in the hex format is what we want to put the memory to its context (cr3).
Examples
If you just want to view the result of assembly (byte codes in HEX) without modifying the memory, the following command can be used.
The following command is used when we want to assemble assembly codes and put the resulting bytes into the target memory at fffff800`3ad6f010
.
The following command is used when we want to assemble assembly codes and put the resulting bytes into the target memory at nt!ExAllocatePoolWithTag
.
The following command is used when we want to assemble assembly codes and put the resulting bytes into the target memory at nt!ExAllocatePoolWithTag+5
.
You can also write multiple lines of assembly codes and use function names in your assembly:
SDK
To assemble a buffer, you need to use the following function in libhyperdbg
:
To get the length of the assembly code, you need to use the following function in libhyperdbg
:
Remarks
To view the byte code of an assembly snippet, you can use the following command (
StartAddress
is useful when dealing with relative instructions like JMP).
This command is guaranteed to keep debuggee in a halt state (in Debugger Mode); thus, nothing will change during its execution.
Requirements
None
Related
Last updated