-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add patch-antimalware-scan-interface-function.yml and updated patch-e… #798
Conversation
…vent-tracing-for-windows-function.yml
- api: kernel32.VirtualProtect | ||
- api: kernel32.VirtualProtectEx | ||
- api: ntdll.NtProtectVirtualMemory | ||
- api: ZwProtectVirtualMemory | ||
- string: "VirtualProtect" | ||
- string: "VirtualProtectEx" | ||
- string: "NtProtectVirtualMemory" | ||
- string: "ZwProtectVirtualMemory" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we should factor this logic out into a library rule, like patch read-only memory at runtime
or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then we can have a rule like hook function at runtime
and then the rules in this PR boil down to:
- match: hook function at runtime
- or:
- string: AmsiScanBuffer
- string: AmsiScanString
and
- match: hook function at runtime
- or:
- string: EventWrite
- ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was initially thinking about using allocate RWX memory
(which in turn depends on allocate memory
) but allocate memory
matches on both memory allocation functions and functions that change of protection of already allocated memory.
So maybe we could split allocate memory
to actual allocate memory
and something like change memory protection
(including VirtualProtect
, VirtualProtectEx
, NtProtectVirtualMemory
, ZwProtectVirtualMemory
). The we could have change memory protection to RWX
and use it in rules in this PR. The problem with this approach would be figuring out which rules currently using allocate memory
rule depend on memory allocation functions, which depend on change of memory functions and which on both.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, that sounds like a great refactor!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactoring this in #836
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update once #836 was merged
anti-analysis/anti-av/patch-antimalware-scan-interface-function.yml
Outdated
Show resolved
Hide resolved
anti-analysis/anti-av/patch-event-tracing-for-windows-function.yml
Outdated
Show resolved
Hide resolved
…n.yml Co-authored-by: Moritz <[email protected]>
….yml Co-authored-by: Moritz <[email protected]>
Add patch-antimalware-scan-interface-function.yml and updated patch-event-tracing-for-windows-function.yml