Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Process execution from a self-deleting binary
id: 0f0da517-b22c-4d14-9adc-36baeb621cf7
version: 1.0.0
description: |
Identifies the execution of the process from a self-deleting binary. The attackers can
abuse undocumented API functions to create a process from a file-backed section. The file
is put into a delete-pending state allowing the attacker to bypass kernel callback controls
by closing the handle to the file before the main thread is spawned.
labels:
tactic.id: TA0005
tactic.name: Defense Evasion
tactic.ref: https://attack.mitre.org/tactics/TA0005/
technique.id: T1055
technique.name: Process Injection
technique.ref: https://attack.mitre.org/techniques/T1055/
references:
- https://github.com/hasherezade/process_ghosting
- https://www.elastic.co/es/blog/process-ghosting-a-new-executable-image-tampering-attack

condition: >
sequence
maxspan 1m
|delete_file and file.info.is_disposition_delete_file| by file.name
|load_module| by image.name

output: >
Process %2.image.name spawned from self-deleting binary
severity: high

min-engine-version: 2.3.0
3 changes: 3 additions & 0 deletions rules/macros/macros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
- macro: create_file
expr: kevt.name = 'CreateFile' and file.operation != 'OPEN' and file.status = 'Success'

- macro: delete_file
expr: kevt.name = 'DeleteFile'

- macro: query_registry
expr: kevt.name in ('RegQueryKey', 'RegQueryValue') and registry.status = 'Success'

Expand Down