Defend yourself against CVE-2023-36884 Office and Windows HTML Remote Code Execution Vulnerability

pull/367/head
Aleff 2023-07-14 11:14:12 +02:00 committed by GitHub
parent 32f997633c
commit f65d885b4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,72 @@
REM #######################################################################################################################
REM # |
REM # Title : Defend yourself against CVE-2023-36884 Office and Windows HTML Remote Code Execution Vulnerability |
REM # Author : Aleff |
REM # Version : 1.0 |
REM # Category : Incident Response |
REM # Target : Windows 10/11 |
REM # |
REM #######################################################################################################################
REM PlugAndPlay <3
REM Requirements:
REM - ExecutionPolicy Bypass
REM Impact: Remote Code Execution
REM Max Severity: Important
REM Mitigation:
REM - Customers who use Microsoft Defender for Office are protected from attachments that attempt to exploit this vulnerability.
REM - The registry key FEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATION is located in the Main folder under the Internet Explorer settings, within the path HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Internet Explorer\FeatureControl. This registry key is used to mitigate the vulnerability known as "Office and Windows HTML Remote Code Execution Vulnerability" (CVE-2023-36884).
REM The CVE-2023-36884 vulnerability allows remote code execution through the processing of HTML files by Office and Windows applications. Creating this registry key and adding specific application values, such as REG_DWORD with data 1, helps block cross-protocol file navigation to mitigate the exploitation of this vulnerability.
REM It is recommended to implement these protective measures to prevent potential attacks that could exploit the vulnerability and compromise the security of Office and Windows systems. It is important to understand the implications of modifying the registry and carefully evaluate the impact on the regular functionality of the involved applications.
REM Source: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2023-36884
DELAY 1000
GUI x
DELAY 500
STRING a
DELAY 500
LEFTARROW
DELAY 500
ENTER
REM Sets the path to the registry key
STRINGLN $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BLOCK_CROSS_PROTOCOL_FILE_NAVIGATION"
REM Array of application names
STRINGLN
$applicationNames = @(
"Excel.exe",
"Graph.exe",
"MSAccess.exe",
"MSPub.exe",
"Powerpnt.exe",
"Visio.exe",
"WinProj.exe",
"WinWord.exe",
"Wordpad.exe"
)
END_STRINGLN
REM Create the registry key if it does not already exist
STRINGLN
if (!(Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
echo "Registry key created"
}
END_STRINGLN
REM Add the values to the registry key
STRINGLN
foreach ($appName in $applicationNames) {
Set-ItemProperty -Path $registryPath -Name $appName -Value 1 -Type DWORD -Force | Out-Null
echo "[+] $appName"
}
END_STRINGLN