【TryHackMe】Attackive Directory 攻略記録
【TryHackMe】Attacktive Directory 攻略記録
概要
この投稿は TryHackMe の Attacktive Directory ルームの攻略記録です。
このルームでは、Active Directory 環境における一連の攻撃手法(ユーザー列挙、Kerberos チケット取得、SMB 調査、NTDS.DIT のダンプなど)を段階的に学ぶことができます。
難易度は easy、所要時間は約 60〜90 分。
| 項目 | 内容 |
|---|---|
| ルーム名 | Attacktive Directory |
| プラットフォーム | TryHackMe |
| 難易度 | easy |
| 所要時間 | 約 60〜90 分 |
| 主な技術要素 | Kerberos, SMB, Hashdump, Pass-the-Hash, NTLM 認証, Privilege Escalation |
学習目標と目的
- Kerberos の AS-REP Roasting の仕組みを理解し、ハッシュクラックまで体験する
- SMB 共有や Active Directory における情報収集の定石を押さえる
- Pass-the-Hash による横展開および管理者権限の奪取を実践する
攻略の流れと設問回答
Task 1: Deploy The Machine
- 仮想マシンを起動し、IP アドレスを確認
❓質問と回答
Q1. Deploy the machine.
A1. —(回答不要)
Task 2: Setup
- Kali Linux など攻撃環境を用意し、VPN 接続を確認
❓質問と回答
Q1. Ensure you're connected to the TryHackMe network.
A1. —(回答不要)
Task 3: Welcome to Attacktive Directory
-
enum4linuxを使って SMB 情報を列挙 - ドメイン名や TLD などの確認
❓質問と回答
Q1. What tool will allow us to enumerate port 139/445?
A1.enum4linux
Q2. What is the NetBIOS-Domain Name of the machine?
A2.THM-AD
Q3. What invalid TLD do people commonly use for their Active Directory Domain?
A3..local
Task 4: Enumerating Users via Kerberos
-
kerbruteを使って有効なユーザー名の列挙を行う
❓質問と回答
Q1. What command within Kerbrute will allow us to enumerate valid usernames?
A1.userenum
Q2. What notable account is discovered?
A2.svc-admin
Q3. What is the other notable account that is discovered?
A3.backup
Task 5: Abusing Kerberos
-
GetNPUsers.pyを使って AS-REP hash を取得し、クラック - ハッシュ形式や Hashcat のモード確認も含まれる
❓質問と回答
Q1. What user account can you query a ticket from with no password?
A1.svc-admin
Q2. What type of Kerberos hash did we retrieve from the KDC?
A2.Kerberos 5 AS-REP etype 23
Q3. What mode is the hash?
A3.18200
Q4. What is the user account’s password (after cracking)?
A4.management2005
Task 6: Back to the Basics
-
smbclientを用いた SMB 共有列挙とファイル取得 - Base64 でエンコードされた文字列をデコードして認証情報を入手
❓質問と回答
Q1. What utility can we use to map remote SMB shares?
A1.smbclient
Q2. Which option will list shares?
A2.-L
Q3. How many remote shares is the server listing?
A3.6
Q4. Which share contains a text file?
A4.backup
Q5. What is the content of the file?
A5.YmFja3VwQHNwb29reXNlYy5sb2NhbDpiYWNrdXA2517860
Q6. What is the full decoded content?
A6.backup@spookysec.local:backup2517860
Task 7: Elevating Privileges within the Domain
-
secretsdump.pyなどで NTDS.DIT をダンプし、NTLM ハッシュを取得 -
Evil-WinRMによる Pass-the-Hash 攻撃で管理者アクセス
❓質問と回答
Q1. What method allowed us to dump NTDS.DIT?
A1.DRSUAPI
Q2. What is the Administrator's NTLM hash?
A2.0e0363213e37b94221497260b0bcb4fc
Q3. What method could allow us to authenticate without password?
A3.Pass The Hash
Q4. What Evil-WinRM option allows us to use a hash?
A4.-H
Task 8: Flag Submission Panel
- 各アカウントのクレデンシャル情報を最終的にまとめて提出
❓質問と回答
Q1. Password for
svc-admin
A1.TryHackMe{K3rb3r0s_Pr3_4uth}
Q2. Password forbackup
A2.TryHackMe{B4ckM3UpSc0tty!}
Q3. Password forAdministrator
A3.TryHackMe{4ctiveD1rectoryM4st3r}
詰まったポイント・気づき
- Kerberos ユーザー列挙は
userenumオプションの有無に注意 - SMB共有に平文・エンコードされた情報が放置されていることがある
- NTDS.DIT ダンプからのハッシュ抽出は再利用を前提とした認証に直結
使用環境・ツール
| 項目 | 内容 |
|---|---|
| OS | Kali Linux |
| ツール | enum4linux, kerbrute, GetNPUsers.py, smbclient, hashcat, evil-winrm |
| 接続方式 | TryHackMe OpenVPN |
Discussion