通过复制已有程序的令牌,可以获得比普通管理员更高级的System权限,也可以获取低权限进程的令牌实现降权,System权限可以做很多平时做不了的事,正因如此也非常危险,不要拿来干坏事!
2021.12.2
- 新增V1版本
- 更新 使用RtlAdjustPrivilege方法获取SeDebugPrivilege
2021.12.3
- 新增RunAsUser方法,强制降权默认以管理员权限启动的程序,由@dbgba提供
V1版本:
V2 版本:
通过复制已有程序的令牌,可以获得比普通管理员更高级的System权限,也可以获取低权限进程的令牌实现降权,System权限可以做很多平时做不了的事,正因如此也非常危险,不要拿来干坏事!
2021.12.2
2021.12.3
V1版本:
V2 版本:
原来是FindProcess(“explorer.exe”)返回了0
执行 StealToken(FindProcess(“explorer.exe”), “cmd.exe”, “/k whoami”) 报错 环境:Windows 11 & AHK_V1_H Error in #include file “C:Users22677OneDriveProgramsrocketLibtoken.ahk”: Unhandled exception. Specifically: 87 Line# 549: Gosub,%ExecLabel% 550: Return,true 551: } 013: { 016: DllCall(“NtdllRtlAdjustPrivilege”, “uint”, 0x14, “char”, 1, “char”, 0, “ptr*”, 0) 020: if (!hProcess := DllCall(“OpenProcess”, “uint”, 0x0400, “int”, 1, “uint”, targetPID)) 021: if (!hProcess := DllCall(“OpenProcess”, “uint”, 0x1000, “int”, 1, “uint”, targetPID)) —> 022: Throw,Exception(A_LastError)