Skip to content

Detect ETW Patching #1787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

JakePeralta7
Copy link

This plugin identifies ETW patching by inspecting the first opcode of the following functions:

  • EtwEventWrite
  • EtwEventWriteFull
  • NtTraceEvent

If the initial opcode is 0xC3 (RET) or 0xE9 (JMP), the function is flagged as patched.

Below is a screenshot demonstrating when the detection is triggered:
WhatsApp Image 2025-04-24 at 20 33 46_3972c8e1

Also, I've added support for scanning specific processes.

This method only checks the first opcode. If an attacker patches elsewhere in the function in a way that corrupts it - the modification will not be detected.

Note: This is my first plugin - any feedback is welcome!

@atcuno atcuno self-requested a review April 24, 2025 18:47
@atcuno
Copy link
Contributor

atcuno commented Apr 24, 2025

@ikelos - I will help with this one as I am very familiar with the intent and it should go through the pe_symbols API to be complete. I will ping you again when it is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants