Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions nursery/execute-shellcode-via-readdirectorychanges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
rule:
meta:
name: execute shellcode via ReadDirectoryChanges
namespace: load-code/shellcode
authors:
- akshatpal@users.noreply.github.com
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- akshatpal@users.noreply.github.com
- akshatpal

description: detect execution of arbitrary shellcode via ReadDirectoryChanges completion routines
scopes:
static: function
dynamic: span of calls
att&ck:
- Defense Evasion::Reflective Code Loading [T1620]
mbc:
- Defense Evasion::Hijack Execution Flow::Abuse Windows Function Calls [F0015.006]
references:
- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-readdirectorychangesw
- https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/nc-minwinbase-lpoverlapped_completion_routine
features:
- and:
- match: allocate or change RWX memory
- or:
- api: ReadDirectoryChanges
- api: ReadDirectoryChangesEx
- or:
- api: SleepEx
- api: WaitForSingleObjectEx
- api: WaitForMultipleObjectsEx
- optional:
- api: CreateFile
Comment on lines +28 to +29
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Loading