{"id":2737,"date":"2021-07-05T12:10:19","date_gmt":"2021-07-05T10:10:19","guid":{"rendered":"https:\/\/fortgale.com\/news\/?p=2737"},"modified":"2021-07-05T12:10:19","modified_gmt":"2021-07-05T10:10:19","slug":"vulnerabilita-critica-printnightmare","status":"publish","type":"post","link":"https:\/\/fortgale.com\/blog\/cyber-security-news\/vulnerabilita-critica-printnightmare\/","title":{"rendered":"Vulnerabilit\u00e0 Critica: PrintNightmare"},"content":{"rendered":"\n<p style=\"text-align: justify\">Alla fine di giugno \u00e8 stata scoperta una nuova vulnerabilit\u00e0 relativa al Print Spooler di Windows (<strong>CVE-2021-1675<\/strong>) che permetteva l&#8217;esecuzione arbitraria di codice con privilegi amministrativi (<strong>Local Privilege Escalation<\/strong>). Il giorno 1 Luglio 2021, a seguito di alcune pubblicazioni da parte di due team di ricercatori, Microsoft ha rilasciato un avviso sulla vulnerabilit\u00e0 <strong>CVE-2021-34527<\/strong>, attraverso la quale \u00e8 possibile non solo eseguire codice con privilegi amministrativi, ma anche eseguire codice da remoto (<strong>Remote Code Execution<\/strong>).<\/p>\n<p style=\"text-align: justify\">La nuova vulnerabilit\u00e0 \u00e8 stata chiamata <strong>PrintNightmare<\/strong> e <strong>affligge tutti i sistemi Windows (Server e PC) aventi il servizio Print Spooler attivo<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Dettagli sulla Minaccia<\/h2>\n\n\n\n<p style=\"text-align: justify\">Per poter sfruttare la vulnerabilit\u00e0 \u00e8 necessario essere in possesso di credenziali valide di un account o essere gi\u00e0 autenticati.<\/p>\n<p style=\"text-align: justify\">La vulnerabilit\u00e0 coinvolge l&#8217;utilizzo della funzione <code><strong>RpcAddPrinterDriverEx<\/strong><\/code> da parte de servizio di Windows <strong>Print Spooler<\/strong>, il quale non riesce a limitare l&#8217;accesso alle sole utenze amministrative.<\/p>\n<p style=\"text-align: justify\">La funzione <code><strong>RpcAddPrinterDriverEx<\/strong><\/code> viene usata per installare un driver di stampa in un sistema. Uno dei parametri della funzione \u00e8 l&#8217;oggetto <code><strong>DRIVER_CONTAINER<\/strong><\/code>, che contiene informazioni su quale driver deve essere usato dalla stampante aggiunta. L&#8217;altro argomento \u00e8 <code><strong>dwFileCopyFlags<\/strong><\/code> e specifica come dovranno essere copiati i nuovi file sostitutivi del driver di stampa. Un attaccante pu\u00f2 sfruttare la possibilit\u00e0 che ha ogni utente autenticato di chiamare la funzione <code><strong>RpcAddPrinterDriverEx<\/strong><\/code> e specificare un file che risiede in un server remoto. In questo modo il servizio del Print Spooler, <strong>spoolsv.exe<\/strong>, eseguir\u00e0 il codice presente in un file DLL arbitrario con privilegi <strong>SYSTEM<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mitigazione<\/h2>\n\n\n\n<p style=\"text-align: justify\">Microsoft ha gi\u00e0 rilasciato delle linee guida per mitigare gli effetti di questa nuova vulnerabilit\u00e0 <a aria-label=\"nel proprio sito web (opens in a new tab)\" href=\"https:\/\/msrc.microsoft.com\/update-guide\/vulnerability\/CVE-2021-34527\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"ek-link\">al link.<\/a><\/p>\n<p style=\"text-align: justify\">In ogni caso, \u00e8 altamente consigliato disabilitare il servizio <strong>Print Spooler<\/strong>, in attesa di una patch da parte di Microsoft.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Disabilitazione del servizio<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><strong>Determine if the Print Spooler service is running<\/strong><\/p><p>Run the following:<\/p><p><code>Get-Service -Name Spooler<\/code><\/p><p>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:<\/p><p><strong>Option 1 &#8211; Disable the Print Spooler service<\/strong><\/p><p>If disabling the Print Spooler service is appropriate for your enterprise, use the following PowerShell commands:<\/p><p><code>Stop-Service -Name Spooler -Force<\/code><\/p><p><code>Set-Service -Name Spooler -StartupType Disabled<\/code><\/p><p><strong>Impact of workaround<\/strong>&nbsp;Disabling the Print Spooler service disables the ability to print both locally and remotely.<\/p><p><strong>Option 2 &#8211; Disable inbound remote printing through Group Policy<\/strong><\/p><p>You can also configure the settings via Group Policy as follows:<\/p><p>Computer Configuration \/ Administrative Templates \/ Printers<\/p><p>Disable the \u201cAllow Print Spooler to accept client connections:\u201d policy to block remote attacks.<\/p><p>You must restart the Print Spooler service for the group policy to take effect.<\/p><p><strong>Impact of workaround<\/strong>&nbsp;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.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Dettagli sulla Minaccia Mitigazione Disabilitazione del servizio Determine if the Print Spooler service is running Run the following: 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2779,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[89,227,273],"class_list":["post-2737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cyber-security-news","tag-cve","tag-microsoft","tag-printspooler"],"_links":{"self":[{"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/posts\/2737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/comments?post=2737"}],"version-history":[{"count":0,"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/posts\/2737\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fortgale.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/media?parent=2737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/categories?post=2737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fortgale.com\/blog\/wp-json\/wp\/v2\/tags?post=2737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}