Print Nightmare CVE-2021-1675 / CVE-2021-34527
The DLL will be stored in C:\Windows\System32\spool\drivers\x64\3\ . The exploit will execute the DLL either from the local filesystem or a remote share.
Requirements:
Detect the vulnerability:
1) Impacket rpcdump
python3 ./rpcdump.py @10.0.2.10 | egrep 'MS-RPRN|MS-PAR'2) It Was All A Dream (Github repo: https://github.com/byt3bl33d3r/ItWasAllADream)
git clone https://github.com/byt3bl33d3r/ItWasAllADream
cd ItWasAllADream && poetry install && poetry shell
itwasalladream -u user -p Password123 -d domain 10.10.10.10/24OR
Payload Hosting:
1) The payload can be hosted on Impacket SMB Server since PR #1109:
2) Using Invoke-BuildAnonymousSMBServer (Admin rights required on host):
3) Using WebDav with SharpWebServer (Doesn't require admin rights):
When using WebDav instead of SMB, you must add @[PORT] to the hostname in the URI, e.g.: \172.16.1.5@8888\Downloads\beacon.dll WebDav client must be activated on exploited target. By default it is not activated on Windows workstations (you have to net start webclient ) and it's not installed on servers. Here is how to detect activated webdav:
Trigger the exploit
1) SharpNightmare
Requires a modified Impacket: https://github.com/cube0x0/impacket
Local Privilege Escalation (LPE)
RCE using existing context
RCE using runas /netonly
2) Invoke-Nightmare
LPE only (ps1 + dll)
3) Mimikatz v2.2.0-20210709+
LPE
RCE
4) PrintNightmare by @outflanknl
Debug Information
Error --> Message --> Debug
PreviousCVE-2022-26925 PetitPotam Pre-AuthNextProxyNotShell / ProxyShell / ProxyLogon (CVE-2022-41040 & CVE-2022-41082 / CVE-2021-34473 & CVE-2021
Last updated