TryHackMe

TryHackMe(THM): Zero Logon -Writeup

セキュリティのアレで取り上げられていて、気になっていたTry Hack MeのZero Logon Roomを改めて攻略しました。

エクスプロイトを試す環境を自分で作る必要がないのが嬉しい。

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=

Task 1 The Zero Day Angle

No answer needed

脆弱性について解説がある

日本語ではkurenaifさんの動画が一番わかりやすいと思うのでそっち見たら良さそう。

暗号化の仕様に脆弱性があって256回に1回くらいの確率で管理者パスワードをなしに設定できるんだって。みつけた人すごい。

Task 2 Impacket Installation

No answer needed

必要なツールのインストール

Task 3 The Proof of Concept

PoCのスクリプトの説明

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=

What method will allow us to change Passwords over NRPC?

NetrServerPasswordSet2

What are the required fields for the method per the Microsoft Documentation?

ドキュメントを参照して答える

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=
PrimaryName, AccountName, SecureChannelType, ComputerName, Authenticator, ReturnAuthenticator, ClearNewPassword

What Opnumber is the Method?

30

Modify the PoC

No answer needed

Task 4 Lab It Up!

マシンをデプロイしてPoCを試す

What is the NetBIOS name of the Domain Controller?

まずnmapを使ってPoCを動かすために必要な情報を調べる

nmap -sV -sC -vV -oA initial.nmap $IP

結果より

DC01

What is the NetBIOS domain name of the network?

HOLOLIVE

What domain are you attacking?

hololive.local

What is the Local Administrator’s NTLM hash?

zeroLogon-NullPass.py

こちらを利用させていただく

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=

前の問題で判明したドメコン名とIPアドレスを指定するだけ。

ちょっと時間かかったけどパスワードをなしに設定変更できた。

secretsdump.py

こちらを利用させていただく

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=

Cloneしてセットアップに従ってインストールしsecretsdump.pyを使う。

sudo secretsdump.py -just-dc -no-pass DC01\$@$IP

すでにパスワードがノーパスになっているので、Windowsに保存されているNTLMハッシュの値が表示される。

カンマで区切られた最後のところがそれ

How many Domain Admin accounts are there?

結果を確認する。Adminはここにa-が付く。

What is the root flag?

Evil-WinRM

こちらを使わせていただく

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=

gemのエラーが出たのでインストールのところはHayashiさんのブログを参考にしました

Pz-LinkCard
- URLの記述に誤りがあります。
- URL=

GitをCloneして今まで判明している情報を使ってエクスプロイトする

ruby evil-winrm.rb -u Administrator -H 3f3ef89114fb063e3d7fc23c20f65568 -i $IP

ものすごくあっさりとフラグゲット

以上!