Process Hollowing Targeting svchost.exe / RegSvcs.exe
Overview
A manual PE loader / process hollowing technique embedded in x86 shellcode dropped by the unclassified-autoit-compiled AutoItSC cluster. The shellcode decrypts an inner payload (typically a .NET assembly), creates a suspended legitimate process, hollows it, and reflectively loads the decrypted PE into the target's address space.
Targets
- Primary:
C:\Windows\System32\svchost.exe— a trusted, frequently-running system process that blends in with normal activity. - Fallback:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exeorv2.0.50727\RegSvcs.exe— .NET Framework utility processes with legitimate CLR context, useful for hosting .NET payloads.
Mechanism
- Path construction: Target process paths are built on the stack character-by-character (stack-string obfuscation), then passed to
CreateProcessAin suspended state. - PE parsing: The shellcode walks the decrypted payload's DOS header (
e_lfanewat offset0x3c), NT headers (SignaturePE\0\0), File Header (Machine,NumberOfSections, etc.), and Optional Header (ImageBase,AddressOfEntryPoint,SizeOfImage,Subsystem). - Section mapping: Each section header (
Name,VirtualAddress,SizeOfRawData,PointerToRawData) is mapped into the target process's memory withNtUnmapViewOfSection/VirtualAllocEx/WriteProcessMemory. - IAT resolution: The shellcode resolves imports by walking the Import Directory, loading DLLs via
LoadLibraryA, and patching thunk tables viaGetProcAddress. - Relocation processing: If the payload cannot load at its preferred
ImageBase, the shellcode fixes base relocations by walking the.relocdirectory. - Thread resumption: The shellcode updates the suspended thread's context (
EAX/Rcx= entry point) and callsResumeThread.
Cluster Context
This exact technique has been observed across at least three confirmed siblings:
127c404a—parachronisticpayload, 15-byte XOR keyK1DOQHHP0ZQDOL4, inner payload AgentTesla .NET assembly.763ae850—ambiparouspayload, 22-byte XOR key, inner payload stripped PE32.6718622d—embowelingpayload, 19-byte XOR key, inner payload AgentTesla.
All use the same DllCallAddress entry point at offset 0x23b0 after RWX allocation via VirtualAlloc.
Detection
- Suspended
svchost.exeorRegAsm.exespawned from%TEMP%or unusual parent processes. - Memory sections in
svchost.exewith RWX permissions and.NETmetadata not matching the on-disk image. - Unmapped original image followed by new allocation at same or different base.
Related
- process-hollowing — general process hollowing concept
- dllcalladdress-shellcode-execution — entry point execution mechanism
- unclassified-autoit-compiled — parent cluster