What is PrintNightmare?

In short, PrintNightmare is the name given to a bug in the Windows Print Spooler service that allows Remote Code Execution (RCE) by abusing of the RpcAddPrinterDriver() function. This was originally given CVE-2021-1675 but is now CVE-2021-34527…some confusion there?!

Some resources I have gathered about this sweet bug:

PoC

Fork of the original post, which was deleted due to the impact: https://github.com/afwu/PrintNightmare
C++ PoC: https://github.com/afwu/PrintNightmare/blob/main/EXP/POC/POC.cpp

Exploit in python: https://github.com/cube0x0/CVE-2021-1675

Video of the PoC by Huntress Labs:

https://youtu.be/qU3vQ-B-FPY
Huntress Labs #PrintNightmare PoC

Mimikatz PrintNighmare Functionality

As of 20210705, Benjamin Delpy (@gentilkiwi) released a version of mimikatz with built-in PrintNightmare exploit functionality: mimikatz 2.2.0-20210705

ItWasAllADream - PrintNightmare RCE Scanner

ItWasAllADream is a tool created by @byt3bl33d3r to scan for the PrintNightmare.

Mitigations…How do we stop this?!

If you are looking for mitigations until the patch is released, as well as some official info from Microsoft: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-34527

Also another one: ttps://blog.truesec.com/2021/06/30/fix-for-printnightmare-cve-2021-1675-exploit-to-keep-your-print-servers-running-while-a-patch-is-not-available/