struct SystemServiceDescriptorTable {
PULONG_PTR ServiceTableBase;
PULONG ServiceCounterTableBase;
ULONG NumberOfServices;
PUCHAR ParamTableBase;
};
- Get KeServiceDescriptorTable using vmi_translate_ksym2v.
- Read the number of system calls from the structure using vmi_read_32_va.
- Get the ServiceTableBase address using vmi_read_64_va.
- use vmi_read_32_va to read all system call function pointers starting from ServiceTableBase.
uint64_t KeServiceDescriptorTableAddress = vmi_translate_ksym2v(vmi, "KeServiceDescriptorTable"); // The address received matches with rekall profile
uint32_t NumberOfServices = 0; vmi_read_32_va(vmi, KeServiceDescriptorTableAddress + 16, 0, &NumberOfServices); printf("Number of System calls = %u\n", NumberOfServices); // NumberOfServices = 450 in my system.
uint64_t ServiceTableBaseAddress = 0; vmi_read_64_va(vmi, KeServiceDescriptorTableAddress + 0, 0, &ServiceTableBaseAddress); printf("ServiceTableBaseAddress = %p\n", ServiceTableBaseAddress); // Matched with rekall profile
for (int i=0; i<NumberOfServices; i++) { uint64_t syscallAddress = 0; vmi_read_64_va(vmi, ServiceTableBaseAddress + (8 * i), 0, &syscallAddress); printf("Syscall#%d = %p\n", i, syscallAddress); // None of them matches with rekall profile }
Syscall#0 = 0xfd43f900fd3c7c04Syscall#1 = 0x370df400158eb42Syscall#2 = 0xfe5e58000193bb00Syscall#3 = 0x19e4906019dc205Syscall#4 = 0x1e4d401019cb405Syscall#5 = 0x133ab0001fe1000Syscall#6 = 0x1f1430001fd8900Syscall#7 = 0x1aa7c000193ae00Syscall#8 = 0x19f250101271401Syscall#9 = 0x18b0e02013d1280--
You received this message because you are subscribed to the Google Groups "vmitools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+unsubscribe@googlegroups.com.
To post to this group, send email to vmit...@googlegroups.com.
Visit this group at https://groups.google.com/group/vmitools.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+u...@googlegroups.com.
kd> d KiServiceTable
fffff802`202f2050 fd3c7c04
fffff802`202f2054 fd43f900
fffff802`202f2058 0158eb42
fffff802`202f205c 0370df40
fffff802`202f2060 0193bb00
fffff802`202f2064 fe5e5800
fffff802`202f2068 019dc205
fffff802`202f206c 019e4906
fffff802`202f2070 019cb405
fffff802`202f2074 01e4d401
fffff802`202f2078 01fe1000To unsubscribe from this group and stop receiving emails from it, send an email to vmitools+unsubscribe@googlegroups.com.
.for(r $t0=0; @$t0<dwo(nt!KiServiceLimit); r $t0=@$t0+1){.printf "%y\n", nt!KiServiceTable+(dwo(nt!KiServiceTable+@$t0*4)>>4)}