|
| 1 | +name: Process execution from remote memory section |
| 2 | +id: 6e4cc918-a30e-4167-ba26-6356d6384f30 |
| 3 | +version: 1.0.0 |
| 4 | +description: | |
| 5 | + Detects execution of a process image originating from a memory section |
| 6 | + mapped without a backing file, a strong indicator of advanced process |
| 7 | + injection techniques such as ghostly hollowing. In this pattern, a malicious |
| 8 | + image is mapped directly into memory, loaded into a remote process, and |
| 9 | + subsequently executed without ever being written to disk. |
| 10 | + This allows attackers to evade file-based detection and forensic recovery. |
| 11 | +labels: |
| 12 | + tactic.id: TA0005 |
| 13 | + tactic.name: Defense Evasion |
| 14 | + tactic.ref: https://attack.mitre.org/tactics/TA0005/ |
| 15 | + technique.id: T1055 |
| 16 | + technique.name: Process Injection |
| 17 | + technique.ref: https://attack.mitre.org/techniques/T1055/ |
| 18 | +references: |
| 19 | + - https://captain-woof.medium.com/ghostly-hollowing-probably-the-most-bizarre-windows-process-injection-technique-i-know-bf833c96663a |
| 20 | + |
| 21 | +condition: > |
| 22 | + sequence |
| 23 | + maxspan 1m |
| 24 | + |map_view_file and |
| 25 | + evt.pid != 4 and ps.sid not in ('S-1-5-18', 'S-1-5-19', 'S-1-5-20') and |
| 26 | + file.view.size > 50000 and file.path = '' and file.view.type = 'IMAGE' and |
| 27 | + ps.exe not imatches |
| 28 | + ( |
| 29 | + '?:\\Windows\\System32\\dwm.exe', |
| 30 | + '?:\\Windows\\System32\\svchost.exe', |
| 31 | + '?:\\Windows\\System32\\services.exe', |
| 32 | + '?:\\Windows\\Microsoft.NET\\Framework\\*\\ngen.exe', |
| 33 | + '?:\\Windows\\Microsoft.NET\\Framework64\\*\\ngen.exe', |
| 34 | + '?:\\Windows\\Microsoft.NET\\Framework\\*\\mscorsvw.exe', |
| 35 | + '?:\\Windows\\Microsoft.NET\\Framework64\\*\\mscorsvw.exe', |
| 36 | + '?:\\Windows\\servicing\\TrustedInstaller.exe', |
| 37 | + '?:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe', |
| 38 | + '?:\\Program Files\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe' |
| 39 | + ) |
| 40 | + | as e1 |
| 41 | + |load_module and |
| 42 | + evt.pid != module.pid and |
| 43 | + module.base = $e1.file.view.base and |
| 44 | + (thread.callstack.summary = '' or thread.callstack.summary imatches '*ntoskrnl.exe!NtMapViewOfSection*') |
| 45 | + | as e2 |
| 46 | + |load_executable and thread.callstack.summary imatches concat('*', base($e2.module.path), '*')| |
| 47 | +action: |
| 48 | + - name: kill |
| 49 | + |
| 50 | +output: > |
| 51 | + Process %3.ps.exe executed from a remotely mapped memory section with no backing file |
| 52 | +severity: high |
| 53 | + |
| 54 | +min-engine-version: 3.0.0 |
0 commit comments