Blazgel's NtWriteVirtualMemory API Hook Cries Crocodile |
NTSTATUS Hook_NtWriteVirtualMemory(ProcessHandle, BaseAddress, Buffer, NumberOfBytesToWrite, NumberOfBytesWritten) { if (True_NtWriteVirtualMemory != NULL) { DbgPrint("crocodile"); return True_NtWriteVirtualMemory(ProcessHandle, BaseAddress, Buffer, NumberOfBytesToWrite, NumberOfBytesWritten); } //snip }
The function named Hook_NtWriteVirtualMemory is the malicious handler that executes when NtWriteVirtualMemory is called. True_NtWriteVirtualMemory is the saved pointer to the real API function. Upon hooking the function, the malware saves the real API so that it can still be referenced when needed. Strangely, this rootkit must have been deployed while still under development, because all the hook does is print crocodile to the kernel debug message facility and then pass the call through to the valid API function.
This post is an excerpt from Malware Superlatives, a sequel to the Making Fun of Your Malware presentation.
- Michael Ligh (@iMHLv2)
No comments:
Post a Comment