-
Notifications
You must be signed in to change notification settings - Fork 446
Description
I have a working C++ DLL project where DllMain executes properly on load, however I wish to inject this DLL file from PowerShell fully in memory. This would work similarly to how your project works, specifically the Stager and the ReflectiveDllMain function. Initially I thought that all I needed was the Stager, but looking deeper into it, it seems I must also change the DLL file to include a ReflectiveDllMain function.
If I understand it correctly the Stager will load the DLL in memory, but can't call DllMain directly, therefore it calls ReflectiveDllMain which does all the heavy lifting of memory management and such, and then at last this function calls the DllMain function.
I guess what I am wondering is if your implementation of the ReflectiveDllMain function in this project also works for other DLLs with minimal/no changes? Or if it is necessary for me to make a lot of modifications for the function to work?
How would you suggest I approach/navigate this challenge?
Thank you.