POC exploit code for CVE-2020-1048(PrintDemon)
All Windows version below mentioned in the link are vulnerable: https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2020-1048
- Change the variables
g_PortName
andg_InputFile
present at the top ofSource.c
. - Compile and run using Visual studio.
- Restart the printer service(spoolsv) or Restart your system.
- In case you want to persist the port and printer creation or want the attack to occur after restart of system, you can exit the program using Ctrl^C once the program ask to press Enter.
getshell.dll
is included which you can use as a payload to spawn a command prompt asSYSTEM
privilege.
https://windows-internals.com/printdemon-cve-2020-1048/
https://github.com/ionescu007/PrintDemon