Bron: Tenable
Update 30 juni: Update over mogelijke 2e kwetsbaarheid.
Update 2 juli: PrintNightmare informatie toegevoegd om duidelijk te maken dat het gaat om verschillende kwetsbaarheden.
Eind juni publiceerden twee verschillende onderzoeksteams informatie over CVE-2021-1675, een kwetsbaarheid voor remote code execution (RCE) in de Windows Print Spooler die de naam PrintNightmare heeft gekregen. Zie hier ook het advies van het NCSC.
Toen de kwetsbaarheid voor het eerst werd onthuld in de Patch Tuesday-update van juni, werd deze omschreven als een kwetsbaarheid met een “beperkte mate van verhoging van privileges”. Die aanduiding werd op 21 juni bijgewerkt tot een kritische kwetsbaarheid en de mogelijkheid van RCE. De ontdekking kwam op naam van Zhipeng Huo van Tencent Security Xuanwu Lab, Piotr Madej van AFINE en Yunhai Zhang van NSFOCUS TIANJI Lab.
Op 27 juni tweette het onderzoeksteam van QiAnXin een GIF waarin succesvolle exploitatie van CVE-2021-1675 werd gedemonstreerd om RCE te verkrijgen zonder enige technische details of proof-of-concept (PoC) code.
Recently, we found right approaches to exploit #CVE-2021-1675 successfully, both #LPE and #RCE. It is interesting that the vulnerability was classified into #LPE only by Microsoft, however, it was changed into Remote Code Execution recently.https://t.co/PQO3B12hoE pic.twitter.com/kbYknK9fBw
— RedDrip Team (@RedDrip7) June 28, 2021
Ook andere onderzoekers publiceren Proof of Concepts:
This #printnightmare / CVE-2021-1675 is really serious 🤪
— 🥝 Benjamin Delpy (@gentilkiwi) June 30, 2021
Just adapted/simplified original POC then:
*From Remote standard user to SYSTEM*
Here on a domain controller, but valid on all systems with RPC to spooler available, remote or local
➡️ disable service now (no patch yet) pic.twitter.com/qpUFgPUZyh
Op 29 juni publiceerden onderzoekers van een ander bedrijf, Sangfor, een volledig technisch verslag met PoC-code op GitHub. Die repository werd echter al na een paar uur weer verwijderd. De onderzoekers beweren deze kwetsbaarheid onafhankelijk te hebben ontdekt van degenen die door Microsoft met de onthulling worden gecrediteerd.
We deleted the POC of PrintNightmare. To mitigate this vulnerability, please update Windows to the latest version, or disable the Spooler service. For more RCE and LPE in Spooler, stay tuned and wait our Blackhat talk. https://t.co/heHeiTCsbQ
— zhiniang peng (@edwardzpeng) June 29, 2021
Hoewel ze de reden voor het verwijderen van de PoC niet expliciet bevestigden, lijkt het erop dat de onderzoekers bezorgd waren om te veel informatie publiekelijk weg te geven voor hun aankomende Black Hat USA presentatie over deze kwetsbaarheid.
Helaas was de GitHub repository lang genoeg publiekelijk beschikbaar voor anderen om hem te klonen. Nieuwe PoC code is inmiddels beschikbaar op het internet.
De nieuwe en ongepatchte bug wordt nu algemeen beschreven met de bijnaam PrintNightmare: het is een Windows Print Spooler Remote Code Execution Vulnerability, net als CVE-2021-1675, maar het wordt niet voorkomen door de laatste Patch Tuesday update.
Writeup for the actual CVE-2021-1675. This vuln includes DLL sideloading and was fixed with June updates.https://t.co/RBcOGb4jyW
— Mitja Kolsek (@mkolsek) June 30, 2021
Microsoft is op de hoogte van en onderzoekt een kwetsbaarheid voor het op afstand uitvoeren van code die van invloed is op Windows Print Spooler en heeft CVE-2021-34527 toegewezen aan deze kwetsbaarheid. Deze situatie is nog in ontwikkeling en de CVE informatie zal worden bijgewerkt zodra er meer informatie beschikbaar is.
Er is sprake van een kwetsbaarheid voor Remote Code Execution op afstand wanneer de Windows Print Spooler-service op onjuiste wijze privileged file operations uitvoert. Een aanvaller die deze kwetsbaarheid met succes misbruikt, kan willekeurige code uitvoeren met SYSTEM-privileges. Een aanvaller zou dan programma’s kunnen installeren, gegevens kunnen bekijken, wijzigen of verwijderen, of nieuwe accounts aanmaken met volledige gebruikersrechten.
Een aanval moet worden uitgevoerd door een geauthenticeerde gebruiker die RpcAddPrinterDriverEx() aanroept.
Exploitatie van CVE-2021-1675 zou aanvallers op afstand volledige controle over kwetsbare systemen kunnen geven. Om een RCE te bereiken, moeten aanvallers zich richten op een gebruiker die geauthenticeerd is voor de spooler service. Zonder authenticatie zou het lek kunnen worden misbruikt om privileges te verhogen, waardoor dit lek een waardevolle schakel in een aanvalsketen wordt.
Windows Print Spooler heeft een lange geschiedenis van kwetsbaarheden en de alomtegenwoordigheid ervan kan ernstige gevolgen hebben voor doelwitten. De kwetsbaarheden in Print Spooler werden meer dan tien jaar geleden met name in verband gebracht met de Stuxnet-aanvallen. Meer recentelijk was CVE-2020-1337 een zero-day in Print Spooler die werd onthuld op de Black Hat en DEF CON evenementen van vorig jaar, wat toevallig een patch bypass was voor CVE-2020-1048, een andere Windows Print Spooler kwetsbaarheid die in mei 2020 werd gepatcht.
CVE-2021-1675 is gepatcht als onderdeel van Microsofts Patch Tuesday-release op 8 juni 2021. Op moment van schrijven lijkt deze patch echter geen volledige oplossing te bieden voor de nieuwe kwetsbaarheid.Kwetsbaarheden als deze worden hoogstwaarschijnlijk gebruikt in gerichte aanvallen.
Er zijn al wel verschillende methodes om de eventuele exploitatie van CVE-2021-1675 te detecteren:
In cooperation with @KevTheHermit & @fuzzyf10w I've created some Sigma rules for the detection of exploits against CVE-2021-1675
— Florian Roth (@cyb3rops) June 30, 2021
Ruleshttps://t.co/zWyLlh34zs
Older one for PoC onlyhttps://t.co/NxV68YZibF
Plz note the new Eventlog mappings: https://t.co/IoCVQxrvPn pic.twitter.com/ycDWTYw0NS
Determine if the Print Spooler service is running (run as a Domain Admin)
Run the following as a Domain Admin:
Get-Service -Name Spooler
If the Print Spooler is running or if the service is not set to disabled, select one of the following options to either disable the Print Spooler service, or to Disable inbound remote printing through Group Policy:
Option 1 – Disable the Print Spooler service
If disabling the Print Spooler service is appropriate for your enterprise, use the following PowerShell commands:
Stop-Service -Name Spooler -Force
Set-Service -Name Spooler -StartupType Disabled
Impact of workaround Disabling the Print Spooler service disables the ability to print both locally and remotely.
Option 2 – Disable inbound remote printing through Group Policy
You can also configure the settings via Group Policy as follows:
Computer Configuration / Administrative Templates / Printers
Disable the “Allow Print Spooler to accept client connections:” policy to block remote attacks.
Impact of workaround This policy will block the remote attack vector by preventing inbound remote printing operations. The system will no longer function as a print server, but local printing to a directly attached device will still be possible.
For more information see: Use Group Policy settings to control printers.
Een overzicht met Tenable plugins om deze kwetsbaarheid te identificeren kan hier worden gevonden. Deze plugins kunnen gebruikt worden voor o.a. Nessus.
Welke kwetsbaarheid wordt publiek benoemd als PrintNightmare?
PrintNightmare is gekoppeld aan CVE-2021-34527.
Is deze kwetsbaarheid gelijk aan de CVE-2021-1675?
Deze kwetsbaarheid is vergelijkbaar met maar verschilt van de kwetsbaarheid CVE-2021-1675, die een andere kwetsbaarheid in RpcAddPrinterDriverEx() aanpakt. Ook de aanvalsvector is anders. CVE-2021-1675 werd verholpen door de beveiligingsupdate van juni 2021.
Heeft de Juni 2021 update deze kwetsbaarheid geintroduceerd?
Nee, de kwetsbaarheid bestond al voor de beveiligingsupdate van juni 2021. Microsoft raadt wel ten zeerste aan om de updates van juni 2021 te installeren.
Welke specifieke rollen zijn bekend geraakt te worden door deze kwetsbaarheid?
Domeincontrollers zijn getroffen. We zijn nog aan het onderzoeken of andere soorten rollen ook getroffen zijn.
Alle versies van Windows worden vermeld bij Microsoft in de tabel met beveiligingsupdates. Zijn alle versies exploiteerbaar?
De code die het lek bevat, zit in alle versies van Windows. Er wordt nog onderzocht of alle versies exploiteerbaar zijn. We zullen deze blog bijwerken zodra die informatie duidelijk is.
Waarom heeft Microsoft nog geen CVSS score toegekend aan deze kwetsbaarheid?
Microsoft is de severity van deze kwetsbaarheid nog aan het onderzoeken.
Microsoft Advisory for CVE-2021-1675
Microsoft Advisory for CVE-2021-34527
Cookie | Duration | Description |
---|---|---|
_GRECAPTCHA | 5 months 27 days | This cookie is set by Google. In addition to certain standard Google cookies, reCAPTCHA sets a necessary cookie (_GRECAPTCHA) when executed for the purpose of providing its risk analysis. |
cookielawinfo-checkbox-advertisement | 1 year | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement". |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
bcookie | 2 years | This cookie is set by linkedIn. The purpose of the cookie is to enable LinkedIn functionalities on the page. |
lang | session | This cookie is used to store the language preferences of a user to serve up content in that stored language the next time user visit the website. |
lidc | 1 day | This cookie is set by LinkedIn and used for routing. |
Cookie | Duration | Description |
---|---|---|
YSC | session | This cookies is set by Youtube and is used to track the views of embedded videos. |
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | This cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors. |
_gat_gtag_UA_116473530_1 | 1 minute | This cookie is set by Google and is used to distinguish users. |
_gat_UA-116473530-1 | 1 minute | This is a pattern type cookie set by Google Analytics, where the pattern element on the name contains the unique identity number of the account or website it relates to. It appears to be a variation of the _gat cookie which is used to limit the amount of data recorded by Google on high traffic volume websites. |
_gid | 1 day | This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visted in an anonymous form. |
Cookie | Duration | Description |
---|---|---|
bscookie | 2 years | This cookie is a browser ID cookie set by Linked share Buttons and ad tags. |
IDE | 1 year 24 days | Used by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile. |
prism_476809757 | 1 month | Used by ActiveCampaign to track usage of newsletters |
test_cookie | 15 minutes | This cookie is set by doubleclick.net. The purpose of the cookie is to determine if the user's browser supports cookies. |
VISITOR_INFO1_LIVE | 5 months 27 days | This cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt-remote-device-id | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
Cookie | Duration | Description |
---|---|---|
AnalyticsSyncHistory | 1 month | No description |
CONSENT | 16 years 7 months 5 days 13 hours | No description |
li_gc | 2 years | No description |
UserMatchHistory | 1 month | Linkedin - Used to track visitors on multiple websites, in order to present relevant advertisement based on the visitor's preferences. |