Ungepatchter Microsoft 0-Day: Wie man CVE-2023-36884 mit PowerShell entschärft

Die Microsoft-Updates für den Patch Tuesday im Juli 2023 weisen auf mehrere Sicherheitslücken hin, die aktiv ausgenutzt werden. Darunter befindet sich eine Sicherheitslücke (oder mehrere?), die noch nicht behoben wurde. Hier erfahren Sie, was Sie über die Zero-Day-Schwachstelle CVE-2023-36884 wissen müssen, die Angreifer ausnutzen, um Remotecodeausführung über „speziell gestaltete“ Microsoft Office-Dokumente zu erlangen.

Was ist CVE-2023-36884?

Kurzantwort: Microsoft bezeichnet CVE-2023-36884 als Sicherheitsanfälligkeit in Office und Windows HTML mit Remotecodeausführung und einem CVSS-Wert von 8.3.

Eine ausführlichere Antwort: Wird erwartet.

Im Moment deutet der Hinweis des Unternehmens darauf hin, dass Microsoft die Schwachstelle noch aktiv untersucht, und liefert nicht viel mehr als eine kurzgefasste Beschreibung. Darin heißt es, dass ein Angreifer bei erfolgreicher Ausnutzung der Sicherheitsanfälligkeit in der Lage ist, Remotecode im Kontext des jeweiligen Betroffenen auszuführen. Dazu müssen betroffene lediglich dazu gebracht werden, ein mit speziellen Funktionen versehenes Microsoft Office-Dokument zu öffnen.

Der Hinweis beginnt mit der Aussage: „Microsoft untersucht Berichte über eine Reihe von Schwachstellen, die Remotecodeausführung ermöglichen“ („Betonung von mir“), was den Schwachstellenexperten Will Dormann zu der Theorie veranlasst, dass „CVE-2023-36884 lediglich ein Platzhalter für ein Update ist, das mehrere Schwachstellen über ein einziges CVE behebt, das möglicherweise zu einem unbekannten Zeitpunkt in der Zukunft veröffentlicht wird“.

Während das Gutachten selbst keine Einzelheiten enthält, verweist es auf einen Blogbeitrag, der mehr über die Entdeckung der Schwachstelle durch Microsoft aussagt.

Spionage und Ransomware – aktive Ausnutzung von CVE-2023-36884

Im Juni identifizierte Microsoft eine Phishing-Kampagne, die von einem Angreifer gestartet wurde, den Microsoft als Storm-0978 bezeichnet. Die Kampagne zielte auf Verteidigungs- und Regierungseinrichtungen in Nordamerika und Europa ab, wobei die Lockangebote im Zusammenhang mit dem ukrainischen Weltkongress standen. Die im Rahmen der Kampagne versandten E-Mails enthielten Links zu Word-Dokumenten, die CVE-2023-36884 missbrauchten, um eine Sicherheitslücke zu installieren.

Während diese Ziele und Aktivitäten nach der Kompromittierung auf Spionagemotive hindeuten, stellt Microsoft fest, dass Storm-0978 während dieser Kampagne auch separate Ransomware-Angriffe auf nicht verwandte Ziele durchführte, die die gleichen ursprünglichen Nutzdaten verwendeten.

Laut Microsoft waren die Ransomware-Aktivitäten des Bedrohungsakteurs „größtenteils opportunistischer Natur und völlig getrennt von den auf Spionage ausgerichteten Zielen“.

UPDATE: Eine noch ausführlichere Analyse dieser Kampagne ist bei BlackBerry erhältlich.

 

Ist ein Patch für CVE-2023-36884 verfügbar?

Momentan nicht.

Microsoft weist darauf hin, dass die Untersuchung dieser Sicherheitslücke noch nicht abgeschlossen ist und dass das Unternehmen nach Abschluss der Untersuchung „die entsprechenden Maßnahmen zum Schutz unserer Kunden ergreifen wird. Dazu kann die Bereitstellung eines Sicherheitsupdates im Rahmen unseres monatlichen Veröffentlichungsprozesses oder die Bereitstellung eines Sicherheitsupdates außerhalb des Zyklus gehören, je nach Kundenbedarf.“

Abhilfen für CVE-2023-36884

Nach Angaben von Microsoft gibt es derzeit drei Möglichkeiten für Unternehmen, sich zu schützen:

  1. Kunden, die Microsoft Defender für Office verwenden, sind vor Anhängen geschützt, die versuchen, diese Sicherheitslücke auszunutzen.
  2. In aktuellen Angriffsketten verhindert die Regel „Block all Office applications from creating child processes „, dass die Sicherheitslücke ausgenutzt wird.
  3. Organisationen, die diese Schutzmaßnahmen nicht in Anspruch nehmen können, haben die Möglichkeit, folgende Anwendungsnamen als Werte des Typs REG_DWORD mit dem Wert 1 in diesen Registrierungsschlüssel aufzunehmen:
    ComputerHKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATION
    • Excel.exe
    • Graph.exe
    • MSAccess.exe
    • MSPub.exe
    • PowerPoint.exe
    • Visio.exe
    • WinProj.exe
    • WinWord.exe
    • Wordpad.exe

Hinweis: Microsoft weist darauf hin, dass diese Registrierungseinstellungen zwar die Ausnutzung von Sicherheitslücken eindämmen können, dass sie aber auch die reguläre Funktionalität für bestimmte Anwendungsfälle im Zusammenhang mit diesen Anwendungen beeinträchtigen können. Daher ist es wichtig, die Änderungen zu testen, bevor sie in großem Umfang eingesetzt werden.

Abschwächung von CVE-2023-36884 mit PowerShell

Für diejenigen, die eine Änderung der Registrierung in Erwägung ziehen, hat unser Software Product Engineer Kyle Bohlander das folgende Skript zur Automatisierung dieses Prozesses erstellt. Wenn Sie dieses Skript mit Ninja (oder einem RMM Ihrer Wahl) verwenden, können Sie die Abschwächung remote und in großem Maß einsetzen.

Hinweis: Dieses Skript ist nicht nur auf NinjaOne-Nutzer beschränkt. Es kann von jedem verwendet werden. Wie von Microsoft empfohlen, sollte diese Korrektur jedoch vor einer allgemeinen Anwendung auf Testrechnern eingesetzt werden. Wenn Sie das Skript ausführen, geschieht dies wie üblich auf eigene Gefahr.

Anforderungen an das Gerät: Geeignet für Systeme mit Windows 7 und Windows Server 2008 und höher.

Wenn Sie die Einstellungen rückgängig machen müssen: Die Einstellungen der Registrierungsschlüssel können mit dem Parameter „Undo“ rückgängig gemacht oder mit dem Parameter „OfficeProducts“ auf bestimmte Office-Produkte übertragen werden.

 

Verfasser: Kyle Bohlander, Software Product Engineer bei NinjaOne

 

 

Laden Sie die Skriptdatei hier herunter.

<#
.SYNOPSIS
    This script will set the registry keys required to remediate CVE-2023-36884. Please note that these keys may effect regular functionality of Microsoft Office Products. 
    These changes can be undone with the -Undo parameter or applied only to specific office products using the -OfficeProducts parameter.
.DESCRIPTION
    This script will set the registry keys required to remediate CVE-2023-36884. Please note that these keys may effect regular functionality of Microsoft Office Products. 
    These changes can be undone with the -Undo parameter or applied only to specific office products using the -OfficeProducts parameter.
.EXAMPLE
    (No Parameters)
    
    Visio was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONVisio.exe to 1
    Success!
    Word was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONWinWord.exe to 1
    Success!
    Wordpad was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONWordpad.exe to 1
    Success!
    Project was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONWinProj.exe to 1
    Success!
    PowerPoint was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONPowerPoint.exe to 1
    Success!
    Excel was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONExcel.exe to 1
    Success!
    Publisher was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONMsPub.exe to 1
    Success!
    Graph was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONGraph.exe to 1
    Success!
    Access was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONMSAccess.exe to 1
    Success!
​
PARAMETER: -Undo
    Remove's the registry keys used for this fix (if they're set at all).
.EXAMPLE
    -Undo
    
    Visio was selected for remediation.
    Succesfully removed registry key!
    Word was selected for remediation.
    Succesfully removed registry key!
    Wordpad was selected for remediation.
    Succesfully removed registry key!
    Project was selected for remediation.
    Succesfully removed registry key!
    PowerPoint was selected for remediation.
    Succesfully removed registry key!
    Excel was selected for remediation.
    Succesfully removed registry key!
    Publisher was selected for remediation.
    Succesfully removed registry key!
    Graph was selected for remediation.
    Succesfully removed registry key!
    Access was selected for remediation.
    Succesfully removed registry key!
​
PARAMETER: -OfficeProducts "Excel,Word"
    Set's the registry key for only those products. Can be given an individual product or a comma seperated list. Can also be used in combination with the -Undo parameter Ex. "Publisher" or "Word,Excel,Access"
.EXAMPLE
    -OfficeProducts "Excel,Word"
    
    Word was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONWinWord.exe to 1
    Success!
    Excel was selected for remediation.
    Set Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATIONExcel.exe to 1
    Success!
​
.OUTPUTS
    None
.NOTES
    General notes
#>
[CmdletBinding()]
param (
    [Parameter()]
    [String]$OfficeProducts = "All",
    [Parameter()]
    [Switch]$Undo
)
​
begin {
​
    # Test's if the script is running in an elevated fashion (required for HKLM edits)
    function Test-IsElevated {
        $id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
        $p = New-Object System.Security.Principal.WindowsPrincipal($id)
        $p.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
    }
​
    # This is just to make setting regkey's easier
    function Set-RegKey {
        param (
            $Path,
            $Name,
            $Value,
            [ValidateSet("DWord", "QWord", "String", "ExpandedString", "Binary", "MultiString", "Unknown")]
            $PropertyType = "DWord"
        )
        if (-not $(Test-Path -Path $Path)) {
            # Check if path does not exist and create the path
            New-Item -Path $Path -Force | Out-Null
        }
        if ((Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue)) {
            # Update property and print out what it was changed from and changed to
            $CurrentValue = (Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name
            try {
                Set-ItemProperty -Path $Path -Name $Name -Value $Value -Force -Confirm:$false -ErrorAction Stop | Out-Null
            }
            catch {
                Write-Error "[Error] Unable to Set registry key for $Name please see below error!"
                Write-Error $_
                exit 1
            }
            Write-Host "$Path$Name changed from $CurrentValue to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name)"
        }
        else {
            # Create property with value
            try {
                New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $PropertyType -Force -Confirm:$false -ErrorAction Stop | Out-Null
            }
            catch {
                Write-Error "[Error] Unable to Set registry key for $Name please see below error!"
                Write-Error $_
                exit 1
            }
            Write-Host "Set $Path$Name to $($(Get-ItemProperty -Path $Path -Name $Name -ErrorAction SilentlyContinue).$Name)"
        }
    }
​
    # All the microsoft office products with their corresponding dword value
    $RemediationValues = @{ "Excel" = "Excel.exe"; "Graph" = "Graph.exe"; "Access" = "MSAccess.exe"; "Publisher" = "MsPub.exe"; "PowerPoint" = "PowerPnt.exe"; "OldPowerPoint" = "PowerPoint.exe" ; "Visio" = "Visio.exe"; "Project" = "WinProj.exe"; "Word" = "WinWord.exe"; "Wordpad" = "Wordpad.exe" }
}
process {
​
    # Error out when not elevated
    if (-not (Test-IsElevated)) {
        Write-Error -Message "Access Denied. Please run with Administrator privileges."
        exit 1
    }
​
    # If they have a smaller selection we'll want to filter our remediation list
    if ($OfficeProducts -notlike "All") {
        $OfficeProducts = $OfficeProducts.split(',') | ForEach-Object { $_.Trim() }
        $RemediationTargets = $RemediationValues.GetEnumerator() | ForEach-Object { $_ | Where-Object { $OfficeProducts -match $_.Key } }
    }
    else {
        $RemediationTargets = $RemediationValues.GetEnumerator()
    }
​
    # Path to all the registry keys
    $Path = "Registry::HKEY_LOCAL_MACHINESOFTWAREPoliciesMicrosoftInternet ExplorerMainFeatureControlFEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATION"
​
    # We'll want to display an error if we don't have anything to do
    if ($RemediationTargets) { 
​
        # For Each product we're targeting we'll set the regkey. The Set-RegKey function already checks if it was succesful and will display an error and exit if it fails
        $RemediationTargets | ForEach-Object { 
            Write-Host "$($_.Name) was selected for remediation."
            if (-not $Undo) {
                Set-RegKey -Path $Path -Name $_.Value -Value 1
                Write-Host "Success!"
            }
            else {
                # If you only applied it to certain products this will error so instead we'll hide the errors and check afterwards if the registry key is there.
                Remove-ItemProperty -Path $Path -Name $_.Value -ErrorAction SilentlyContinue | Out-Null
                if (Get-ItemProperty -Path $Path -Name $_.Value -ErrorAction SilentlyContinue) {
                    Write-Error "[Error] Unable to undo registry key $($_.Value)!"
                    exit 1
                }
                else {
                    Write-Host "Succesfully removed registry key!"
                }
            }
        }
​
        Write-Warning "A reboot may be required."
        exit 0
    }
    else {
        Write-Host $RemediationTargets
        Write-Warning "No products were selected! The valid value's for -OfficeProducts is listed below you can also use a comma seperated list or simply put 'All'."
        $RemediationValues | Sort-Object Name | Format-Table | Out-String | Write-Host
        Write-Error "ERROR: Nothing to do!"
        exit 1
    }
}

 

Nächste Schritte

Der Aufbau eines effizienten und effektiven IT-Teams erfordert eine zentralisierte Lösung, die als vereintes Tool für die Bereitstellung von Dienstleistungen fungiert. NinjaOne ermöglicht es IT-Teams, all ihre Geräte zu überwachen, verwalten, sichern und zu unterstützen, unabhängig von ihrem Ort und komplexer Infrastruktur vor Ort.

Erfahren Sie mehr über NinjaOne Endpoint Management schauen Sie sich eine Live-Tour an oder starten Sie Ihre kostenlose Testversion der NinjaOne Plattform.

Kategorien:

Das könnte Sie auch interessieren

Demo ansehen×
×

Sehen Sie NinjaOne in Aktion!

Mit dem Absenden dieses Formulars akzeptiere ich die Datenschutzerklärung von NinjaOne.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).