
Windows 토큰 조작 유틸리티로, 프로세스 또는 사용자 토큰을 열거·탈취·가장하여 다른 사용자로 명령을 실행하고, SeImpersonate 및 SeAssignPrimary 권한을 활용합니다.
얼마 전에 Windows 토큰을 탈취하고 조작하기 위해 작성한 간단한 도구입니다.
코드의 일부는 https://github.com/FSecureLABS/incognito 에서 가져와 수정했습니다.
물론 모든 프로세스에 접근하려면 Impersonation 또는 AssignPrimary 권한과 Debug 권한이 필요합니다.
일반적으로 이 도구는 SYSTEM과 같은 최고 로컬 권한으로 실행합니다.
TokenStealer.exe
[+] My personal simple and stupid Token Stealer... ;)
[+] v1.0 @decoder_it 2023
[!] Usage:
-l: list all user's token
-e: list all user's token with extended info -> [user]:[token_level (2)=Impersonation, (3)=Delegation,(P)=Primary>]:[pid]:[SessionId]
-p: <pid> list/steal token from specfic process pid
-u: <user> list/steal token of user
-c: <command> command to execute with token
-t: force use of impersonation Privilege
-b: <token level> needed token type: 1=Primary,2=Impersonation,3=Delegation
-s: <SessionId> list/steal token from specific Session ID
=Examples=
TokenStealer.exe -e -b 1
-> list all primary tokens
TokenStealer.exe -l -p 100
-> list all tokens in process pid 100
TokenStealer.exe -u MYDOMAIN\administrator -c c:\windows\system32\cmd.exe
-> steal token of the user and execute an interactive command shell using the AssingPrimary privilege if available
TokenStealer.exe -u MYDOMAIN\administrator -c c:\windows\system32\bind.bat -p 100 -t
-> steal token of the user in process 100 and execute the batch file using Impersonation privilege instead of AssingPrimary
TokenStealer.exe -u MYDOMAIN\administrator -c c:\windows\system32\cmd.exe -b 1
-> steal a primary token of the user and execute an interactive command shell using the AssingPrimary privilege if available
TokenStealer.exe -u MYDOMAIN\administrator -c c:\windows\system32\cmd.exe -s 2
-> steal a token of the user in specific SessionID and execute an interactive command shell using the AssingPrimary privilege if available