DLL Hijacking
Procmon:
open procmon (sysinternals) and filter for 'not found'.
once a DLL to inject has been found, identify what we need to implement, run:
From the dumpbin check for the DLL you are looking to inject, for this example we will use 'winmm.dll', and hijack PUTTY.exe. google the results and check for information about the libraries e.g PlaySoundA:
Open a debugger to see what the app is doing with the lib injection (in the arch of the exe) and search for the library identified in the DLL. Once found, jump through the identified library calls to check what is does. Using the above example, this should show similar:
then create the following dll (with updated code from your binary):
winmm.def:
winmm.dll:
and compile using:
(making sure that you are in the correct ARCH)
Place the DLL into the hijacking pass and should be a hit
Last updated