MVISION Insights: CVE-2021-1675 and CVE-2021-34527 Windows Print Spooler Remote Code Execution Vulnerability
Technical Articles ID:
KB94676
Last Modified: 4/5/2022
Last Modified: 4/5/2022
Environment
IMPORTANT: This Knowledge Base article discusses a specific threat that is being automatically tracked by MVISION Insights technology. The content is intended for use by MVISION Insights users, but is provided for general knowledge to all customers. Contact us for more information about MVISION Insights.
Summary
Description of Campaign
The Microsoft Windows Print Spooler service fails to restrict access to the RpcAddPrinterDriverEx() function.
This failure can allow a remote authenticated attacker to execute arbitrary code with System privileges on a vulnerable system.
Although Microsoft has released an update for CVE-2021-1675, this update does NOT protect Active Directory domain controllers, or systems that have Point and Print configured with the NoWarningNoElevationOnInstall option configured.
On July 1, 2021, Microsoft released another CVE, namely CVE-2021-34527. Microsoft states that this vulnerability is similar but distinct from the vulnerability assigned to CVE-2021-1675.
CVE-2021-1675 addresses a different vulnerability inRpcAddPrinterDriverEx() with a different attack vector. CVE-2021-1675 is addressed by the June 2021 security update.
Exploit code for this vulnerability that targets Active Directory domain controllers is publicly available as PrintNightmare.
Source: Carnegie Mellon University.
For more information, see Microsoft's documentation for CVE-2021-34527, including update downloads, FAQs, and workarounds.
IMPORTANT: After you implement the Microsoft update, you must perform further mitigation measures to prevent this vulnerability from being exploited.
These measures are documented in the Microsoft Security Update: CVE 2021-34527 - Windows Print Spooler Remote Code Execution Vulnerability
Also, Microsoft strongly recommends that you view the information in KB5005010 - Restricting installation of new printer drivers after applying the July 6, 2021 updates.
Threat Advisory:
McAfee Labs analyzed the malware and published a threat advisory in KB94669 - Threat Advisory: CVE-2021-1675 - Print Nightmare.
How to use this article:
Campaign IOC
Minimum Content Versions
Detection Summary
Minimum set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Endpoint Security - Advanced Threat Protection:
Endpoint Security - Expert Rule:Rule class : Files
Rule {
Process {
Include OBJECT_NAME { -v "spoolsv.exe" }
}
Target {
Match FILE {
Include OBJECT_NAME { -v "%systemroot%\\System32\\spool\\drivers\\**\\New\\*.dll" }
Include OBJECT_NAME { -v "%systemroot%\\System32\\spool\\drivers\\**\\Old\\*\\*.dll" }
Include -access "CREATE"
}
}
}
VirusScan Enterprise - Access Protection Custom Rules:
Rule: 1
Rule Type: File
Process to include: Spoolsv.exe
File or folder name to block: %systemroot%\System32\spool\drivers\**\Old\*
File actions to prevent: Write,Create
Rule: 2
Rule Type: File
Process to include: Spoolsv.exe
File or folder name to block: %systemroot%\System32\spool\drivers\**\New\*
File actions to prevent: Write, Create
Endpoint Security - Access Protection Custom Rules:
Rule: 1
Executables (Include):Spoolsv.exe
Subrules:
Subrule Type: Files
Operations:
create
Targets (Include):%systemroot%\System32\spool\drivers\**\Old\*
Rule: 2
Executables (Include):Spoolsv.exe
Subrules:
Subrule Type: Files
Operations:
create
Targets (Include):%systemroot%\System32\spool\drivers\**\New\*
Aggressive set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Host Intrusion Prevention:Rule ID: 1148 CMD Tool Access by a Network Aware Application
Rule ID: 6011 Generic Application Invocation Protection
Rule ID: 1020 Windows Agent Shielding - File Access
Rule ID: 6010 Generic Application Hooking Protection
The Microsoft Windows Print Spooler service fails to restrict access to the RpcAddPrinterDriverEx() function.
This failure can allow a remote authenticated attacker to execute arbitrary code with System privileges on a vulnerable system.
Although Microsoft has released an update for CVE-2021-1675, this update does NOT protect Active Directory domain controllers, or systems that have Point and Print configured with the NoWarningNoElevationOnInstall option configured.
On July 1, 2021, Microsoft released another CVE, namely CVE-2021-34527. Microsoft states that this vulnerability is similar but distinct from the vulnerability assigned to CVE-2021-1675.
CVE-2021-1675 addresses a different vulnerability in
Exploit code for this vulnerability that targets Active Directory domain controllers is publicly available as PrintNightmare.
Source: Carnegie Mellon University.
For more information, see Microsoft's documentation for CVE-2021-34527, including update downloads, FAQs, and workarounds.
IMPORTANT: After you implement the Microsoft update, you must perform further mitigation measures to prevent this vulnerability from being exploited.
These measures are documented in the Microsoft Security Update: CVE 2021-34527 - Windows Print Spooler Remote Code Execution Vulnerability
Also, Microsoft strongly recommends that you view the information in KB5005010 - Restricting installation of new printer drivers after applying the July 6, 2021 updates.
Threat Advisory:
McAfee Labs analyzed the malware and published a threat advisory in KB94669 - Threat Advisory: CVE-2021-1675 - Print Nightmare.
How to use this article:
- If a Threat Hunting table has been created, use the rules contained to search for malware related to this campaign.
- Review the product detection table and confirm that your environment is at least on the specified content version.
To download the latest content versions, go to the Security Updates page. - Scroll down and review the "Product Countermeasures" section of this article. Consider implementing them if they are not already in place.
- Review
KB91836 - Countermeasures for entry vector threats . - Review KB87843 - Dynamic Application Containment rules and best practices.
- Review KB82925 - Identify what rule corresponds to an Adaptive Threat Protection and Threat Intelligence Exchange event.
Campaign IOC
Type | Value |
Minimum Content Versions
Content Type | Version |
Detection Summary
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
IOC | Scanner | Detection |
Minimum set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Endpoint Security - Advanced Threat Protection:
Rule ID: 4 Use GTI file reputation to identify trusted or malicious files
Endpoint Security - Expert Rule:
Rule {
Process {
Include OBJECT_NAME { -v "spoolsv.exe" }
}
Target {
Match FILE {
Include OBJECT_NAME { -v "%systemroot%\\System32\\spool\\drivers\\**\\New\\*.dll" }
Include OBJECT_NAME { -v "%systemroot%\\System32\\spool\\drivers\\**\\Old\\*\\*.dll" }
Include -access "CREATE"
}
}
}
VirusScan Enterprise - Access Protection Custom Rules:
Process to include: Spoolsv.exe
File or folder name to block: %systemroot%\System32\spool\drivers\**\Old\*
File actions to prevent: Write,Create
Rule: 2
Process to include: Spoolsv.exe
File or folder name to block: %systemroot%\System32\spool\drivers\**\New\*
File actions to prevent: Write, Create
Endpoint Security - Access Protection Custom Rules:
Subrules:
Subrule Type: Files
Operations:
create
Targets (Include):%systemroot%\System32\spool\drivers\**\Old\*
Rule: 2
Subrules:
Subrule Type: Files
Operations:
create
Targets (Include):%systemroot%\System32\spool\drivers\**\New\*
Aggressive set of Manual Rules to improve protection to block this campaign:
IMPORTANT: Always follow best practices when you enable new rules and signatures.
When you implement new rules or signatures, always set them to Report mode first and check the alerts generated. Resolve any issues that arise and then set the rules to Block. This step mitigates against triggering false positives and allows you to refine your configuration.
For more information, see KB87843 - List of and best practices for Endpoint Security Dynamic Application Containment rules.
Host Intrusion Prevention:
Rule ID: 6011 Generic Application Invocation Protection
Rule ID: 1020 Windows Agent Shielding - File Access
Rule ID: 6010 Generic Application Hooking Protection