This is a simple DLL designed for testing DLL sideloading and injection techniques. When loaded into a process, it displays a message box to confirm successful injection.
The DLL uses the DllMain entry point to execute code when it's loaded into a process. Upon attachment (DLL_PROCESS_ATTACH), it displays a message box with the text "DLL SideLoad Success".
- Simple Indicator: Shows a visible message box to confirm DLL loading
- Process Attachment Hook: Executes automatically when the DLL is loaded
- Minimal Dependencies: Only requires
windows.handuser32.dll
To compile the DLL, use GCC with the following command:
gcc -shared -o shellcode-dll.dll shellcode-dll.c -luser32- MinGW GCC compiler
- Windows environment
user32library (for MessageBox API)
- Identify a vulnerable application that loads DLLs from its application directory
- Rename the compiled DLL to match the expected DLL name
- Place it in the application's directory
- Execute the application
- The message box should appear, confirming successful sideloading
This DLL can also be injected using various injection techniques:
- Classic DLL Injection (
LoadLibrary+CreateRemoteThread) - Reflective DLL Injection
- Manual Mapping
- Process Hollowing
- Only use on systems you own or have explicit permission to test
- Understand the legal implications in your jurisdiction
- Use responsibly and ethically
This DLL can be used in conjunction with other process injection methods in this repository:
When successfully loaded, the DLL displays:
- Title: "Hello"
- Message: "DLL SideLoad Success"
- Type: Information dialog with OK button