rdmsr (read model-specific register) | HyperDbg Documentation

rdmsr (read model-specific register)

Description of the 'rdmsr' command in HyperDbg.

rdmsr

rdmsr [Msr (hex)] [core CoreNumber (hex)]

Reads the model-specific register using 'rdmsr' instruction.

[Msr (hex)]

The index of MSR (ECX Register for 'rdmsr' instruction).

[core CoreNumber (hex)] (optional)

The core that we want to read the 'rdmsr' from it.

If you don't specify the 'core' by default, it shows the MSR for all cores.

The following command shows the MSR register for c0000082 using rdmsr command.

The following example shows the MSR c0000082 for core 2.

This function works by calling DeviceIoControl with IOCTL = IOCTL_DEBUGGER_READ_OR_WRITE_MSR, you have to send it in the following structure.

Where Msr is ecx value for 'rdmsr' or 'wrmsr' instruction, CoreNumber is the target core that you want to read or write on it and ActionType shows whether it's an 'rdmsr' or 'wrmsr'.

If you want to execute 'wrmsr' or 'rdmsr', you should set CoreNumber to DEBUGGER_READ_AND_WRITE_ON_MSR_APPLY_ALL_CORES.

This command will continue the debuggee for some time (in Debugger Mode). This means that you lose the current context (registers & memory) after executing this command.

None

wrmsr (write model-specific register)arrow-up-right