11name : Process execution from hollowed memory section
22id : 2a3fbae8-5e8c-4b71-b9da-56c3958c0d53
3- version : 2.0 .0
3+ version : 2.1 .0
44description : |
55 Adversaries may inject malicious code into suspended and hollowed processes in order to
66 evade process-based defenses. Process hollowing is a method of executing arbitrary code
77 in the address space of a separate live process.
8-
9- Process hollowing is commonly performed by creating a process in a suspended state then
10- unmapping/hollowing its memory, which can then be replaced with malicious code. A victim
11- process can be created with native Windows API calls such as CreateProcess, which includes
12- a flag to suspend the processes primary thread. At this point the process can be unmapped
13- using APIs calls such as ZwUnmapViewOfSection or NtUnmapViewOfSection before being written
14- to, realigned to the injected code, and resumed via VirtualAllocEx, WriteProcessMemory,
15- SetThreadContext, then ResumeThread/ResumeProcess respectively.
168labels :
179 tactic.id : TA0005
1810 tactic.name : Defense Evasion
@@ -28,27 +20,28 @@ references:
2820
2921condition : >
3022 sequence
31- maxspan 2m
32- |spawn_process and
33- ps.parent.sid not in ('S-1-5-18', 'S-1-5-19', 'S-1-5-20') and
34- ps.parent.exe not imatches
35- (
36- '?:\\Program Files\\*.exe',
37- '?:\\Program Files (x86)\\*.exe'
38- )
39- | as e1
23+ maxspan 40s
4024 |unmap_view_of_section and
41- ps.uuid = $e1.ps.uuid and
42- file.view.size > 20000 and file.view.protection != 'READONLY'
43- | as e2
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 > 20000 and file.view.protection != 'READONLY' and
27+ (file.name = '' or file.extension != '.dll') and
28+ ps.parent.exe not imatches
29+ (
30+ '?:\\Windows\\System32\\dwm.exe',
31+ '?:\\Windows\\System32\\svchost.exe',
32+ '?:\\Windows\\System32\\services.exe',
33+ '?:\\Windows\\Microsoft.NET\\Framework*\\ngen.exe',
34+ '?:\\Windows\\Microsoft.NET\\Framework*\\mscorsvw.exe'
35+ )
36+ | by ps.uuid, file.view.base
4437 |load_executable and
45- ps.uuid = $e2.ps.uuid and image.base.address = $e2.file.view.base
46- |
38+ image.path not imatches '?:\\Windows\\SoftwareDistribution\\Download\\*\\Package_for_RollupFix*\\*.exe'
39+ | by ps.uuid, image.base.address
4740action :
4841 - name : kill
4942
5043output : >
51- Process %3 .ps.exe executed from hollowed memory section
44+ Process %2 .ps.exe executed from hollowed memory section
5245severity : high
5346
5447min-engine-version : 3.0.0
0 commit comments