In the case of successfully attacked Exchange servers with the HAFNIUM exploit, the directory permissions may be changed, resulting in affected Exchange servers reporting an error message when installing updates. Here is an example of a directory where the permissions have been changed:
Wie im Screenshot zu sehen ist, wurden die Berechtigungen für das Prinzipal „Jeder“ auf „Lesen“ gesetzt. Diese geänderten Berechtigungen führen zu der folgenden Fehlermeldung, wenn versucht wird ein Exchange Update zu installieren:
Error:
Fehler beim Installieren des Produkts c:\temp\Exchange Cu23\exchangeserver.msi. Schwerwiegender Fehler bei der Installation. Fehlercode: 1603. Letzter vom MSI-Paket ausgegebener Fehler: ‚The installer has insufficient privileges to access this directory: C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\owa\auth\15.0.1497. The installation cannot continue. Log on as administrator or contact your system administrator.‘.
Normally this directory has different permissions as can be seen in the following screenshot:
According to a tweet, this is not only limited to the \owa\auth folder, but also to other folders. There are already some people on Twitter who have published corresponding tweets:
Anyone who has already found changed directory rights to Exchange directories must therefore assume that the attack on the Exchange server was successful. Even if no conspicuous .js or .apsx files can be found in the directories, the affected Exchange server should immediately disconnected from the Internet werden. Ich würde in diesem Fall zur Neuinstallation raten, da dies aktuell der sicherste Weg ist, um wieder eine „vertrauenswürdige“ Installation zu haben.
If possible, you should save the log files and event logs before reinstalling so that you can find out details about the attack afterwards.
Update 14.03.21: Das folgende kleine Quick and Dirty Script kann verwendet werden um Verzeichnisse zu suchen, auf dem das Prinzipal „Jeder“ nur Leserechte hat:
$FolderRoot = "C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy"
$Principal = "Jeder"
$AllFolders = (Get-ChildItem $FolderRoot -Recurse -Directory | select fullname).Fullname
foreach ($Folder in $Allfolders) {
Get-Acl $Folder | where {$_.access.IdentityReference -match $Principal -and $_.access.FileSystemRights -match "Read"}
}
Bei Servern in englischer Sprache muss das Prinzipal auf „Everyone“ angepasst werden. FolderRoot ist das Startverzeichnis, ab dem rekursiv gesucht wird.