DLL Injection
Injecting DLL into a remote process.
This lab attempts a classic DLL injection into a remote process.
Execution
inject-dll.cpp
Compiling the above code and executing it with a supplied argument of 4892
which is a PID of the notepad.exe process on the victim system:
attacker@victim
After the DLL is successfully injected, the attacker receives a meterpreter session from the injected process and its privileges:
Observations
Note how the notepad spawned rundll32 which then spawned a cmd.exe because of the meterpreter payload (and attacker's shell
command) that got executed as part of the injected evilm64.dll into the notepad process:
References
Last updated