Skip to content

Instantly share code, notes, and snippets.

@bats3c
Last active September 4, 2020 14:42
Show Gist options
  • Save bats3c/a4504942162d7a2907df0d58cce2e581 to your computer and use it in GitHub Desktop.
Save bats3c/a4504942162d7a2907df0d58cce2e581 to your computer and use it in GitHub Desktop.
Pattern search for the ETW callback
#define PATTERN "\x48\x83\xec\x38\x4c\x8b\x0d"
DWORD i;
LPVOID lpCallbackOffset;
for (i = 0; i < 0xfffff; i++)
{
if (!memcmp((PVOID)(dwBase + i), (unsigned char*)PATTERN, strlen(PATTERN)))
{
lpCallbackOffset = (LPVOID)(dwBase + i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment