Enhance the token authority of the process

xiaoxiao2021-03-06  15

Kill system processes only enhance the look token privileges of this process, it has debugging rights to: HANDLE hToken, hProcess; TOKEN_PRIVILEGES tp; char * pSEDEBUG = "SeDebugPrivilege"; hProcess = GetCurrentProcess (); OpenProcessToken (hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, & hToken); LookupPrivilegeValue (NULL, pSEDEBUG, & tp.Privileges [0] .Luid); tp.PrivilegeCount = 1; tp.Privileges [0] .Attributes = SE_PRIVILEGE_ENABLED; AdjustTokenPrivileges (hToken, FALSE, & tp, NULL, NULL, NULL);

转载请注明原文地址:https://www.9cbs.com/read-46377.html

New Post(0)