16 lines
538 B
C++
16 lines
538 B
C++
#include "PdFwKrnl.h"
|
|
|
|
int main(void) {
|
|
if (!pdfwkrnl::attach()) {
|
|
printf(STR("failed to attach to driver \n"));
|
|
return -1;
|
|
}
|
|
|
|
// a ntstatus of STATUS_INVALID_IMAGE_HASH or 0xC0000428 will always be returned as NtCompareSigningLevels always returns it if returned value by the called function is not equal then 0.
|
|
pdfwkrnl::call_kernel_function<void>(pdfwkrnl::get_kernel_export("DbgPrint"), "hello from pdfwkrnl!\n");
|
|
|
|
if (!pdfwkrnl::detach()) {
|
|
printf(STR("failed to detach from driver \n"));
|
|
return -1;
|
|
}
|
|
} |