logo exchange

Controle op CVE-2023-23397

Naar aanleiding van CVE-2023-23397 heb je waarschijnlijk reeds de update overal geinstalleerd. Wat nog rest is het controleren of je organisatie is geraakt door dit lek.

Zorg dat jouw admin account rechten heeft voor de impersonation:

New-ManagementRoleAssignment -Role "ApplicationImpersonation" -User admin@domain.com

Optioneel stel je een throttling policy in:

New-ThrottlingPolicy "CVE-2023-23397-Script" 
Set-ThrottlingPolicy "CVE-2023-23397-Script" -EWSMaxConcurrency Unlimited -EWSMaxSubscriptions Unlimited -CPAMaxConcurrency Unlimited -EwsCutoffBalance Unlimited -EwsMaxBurst Unlimited -EwsRechargeRate Unlimited 
Set-Mailbox -Identity "jouw admin account" -ThrottlingPolicy "CVE-2023-23397-Script"

Vervolgens draai je het gedownloade script CVE-2023-23397.ps1 dat je vindt op Microsoft’s GitHub pagina:

Get-Mailbox | .\CVE-2023-23397.ps1 -Environment Onprem -EWSServerURL https://mx.susse.local/EWS/Exchange.asmx -IgnoreCertificateMismatch

Dat geeft een pop-up waarin je je credentials invoert (domain\admin) en vervolgens begint de scan.

De resultaten vind je terug in een csv file in de map waar je het script uitgevoerd hebt. Om een cleanup uit te voeren, pas je in de laatste kolom de N aan naar een Y. In mijn geval heb ik enkele oude agenda items waar de scan over valt.

Gevonden berichten kun je nu clearen:

.\CVE-2023-23397.ps1 -Environment Onprem -EWSServerURL https://mx.susse.local/EWS/Exchange.asmx -IgnoreCertificateMismatch -CleanupAction ClearProperty -CleanupInfoFilePath <Path to modified CSV>

of verwijderen:

.\CVE-2023-23397.ps1 -Environment Onprem -EWSServerURL https://mx.susse.local/EWS/Exchange.asmx -IgnoreCertificateMismatch -CleanupAction ClearItem -CleanupInfoFilePath <Path to modified CSV>

bron: microsoft