Summary
- Needs Admin: False
- Version: 1
- Author: @Ne0nd0g
- Use the Make Token parameter group to create a new access token
- Use the Steal Token parameter group to steal an access token
- Use the Token Privs parameter group to view a token’s privileges
- The Default parameter group can be used to interact with ANY method
Alias Commands
There are several alias commands that facilitate interacting directly with a specific methodMethods
make
Make a Windows Access Token, see the Make Token parameter group for additional detailsprivs
Enumerate Windows Access Token privleges, see the Token Privs parameter group for additional details Usage:token -method privs -args [<PID>]
rev2self
Therev2self method leverages the RevertToSelf
Windows API function and releases, or drops, any access token that have been created or stolen.
See the rev2self command alias
Usage:
token -method rev2self or token rev2self
steal
Steal a Windows Access Token from a target process, see the Steal Token parameter group for additional details Usage:token -method steal -args <PID>
whoami
Thewhoami command leverages the Windows GetTokenInformaion API call to return information
about both the process and thread Windows access token. This information includes:
- Username
- Token ID
- Logon ID
- Privilege Count
- Group Count
- Token Type
- Token Impersonation Level
- Integrity Level
token -method whoami or token whoami
Example output:
Parameter Groups
Default
The default parameter group facilitates executing any available Windows Access token methodArguments
method
- Description: The “method” to interact with Windows access tokens
- Required Value: True
- Choices: make, privs, rev2self, steal, whoami
- Default Value: whoami
arguments
- Description: Arguments that are specific to the selected token method
- Required Value: False
- Default Value: None
Usage
Make Token
The Make Token parameter group is used to explicitly create a Windows Access Token and apply it to the agent Additionally, there is the make_token command that can be called directlyArguments
user
- Description: Domain and username to make a token for (e.g. ACME\RASTLEY)
- Required Value: True
- Default Value: None
pass
- Description: The account’s password
- Required Value: True
- Default Value: None
Usage
Steal Token
The Steal Token parameter group is used to copy a Windows Access Token from a target process and apply it to the agent Additionally, there is the steal_token command that can be called directlyArguments
pid
- Description: The process ID to interact with
- Required Value: True
- Default Value: None
Usage
Token Privs
The Token Privs parameter group is used to enumerate the privileges for the Windows access token associated with the target process. If a PID is not provided, the privileges for the current process will be returned Example results:Arguments
token-pid
- Description: The process ID to interact with
- Required Value: False
- Default Value: None
Usage
MITRE ATT&CK Mapping
- T1134 Access Token Manipulation
- T1134.001 Access Token Manipulation: Token Impersonation/Theft
- T1134.003 Access Token Manipulation: Make and Impersonate Token