DLL Sideloading not by DLLMain
Never run your payloads from the DLLMain
Identifying potential hijacks
frida -f C:\Windows\System32\<any.exe> -l loadlibrary.js
Is that function really called

Making a Sideloadable DLL
Step 1: Create a DLL project


Step 2: You will see a blank project like below

Step 3: Create the pragma comment for proxying the calls to the original DLL. Use the following script to generate them quickly
Step 4: Copy the lines to the project

Step 5: Comment the function which we want to hijack which is HrInitComposeFormDll

Step 6: Find the function prototype

Step 7: Define the proxy function in the def file



Step 8: Make the proxy function
Below is the full dllmain.cpp code and FxsCompose.def
Compile the DLL

Running the DLL Sideload


Project Files
Last updated