Fortinet - New DearCry ransomware targets Microsoft Exchange vulnerabilities
March 12, 2021
Bastian Seibel
Fortinet
Fortinet
IT security vendor Fortinet's FortiGuard Labs is currently tracking multiple reports of a new ransomware campaign known as DearCry. This malware campaign targets the same four Microsoft Exchange Server vulnerabilities that have been exploited by a number of threat actors in recent weeks, including Hafnium.
The four vulnerabilities targeted by DoejoCrypt/DearCry are CVE-2021-26855, CVE-2021-26857, CVE-2021-26858 and CVE-2021-27065. The attack targets a Microsoft Exchange server, which can receive an untrusted connection from an external source. Once installed, the DearCry Ransomware creates encrypted copies of the attacked files and deletes the originals.
During its encryption routine, the DearCry Ransomware uses an AES-256 encryption to encrypt the attacked files and then uses an RSA-2048 key to encrypt the AES key as well. To make matters worse, the public-key cryptosystem has its public encryption key embedded in the ransomware binary, which means DearCry does not need to contact the attacker's command & control server to encrypt files. This means that it can also encrypt Exchange servers that only allow internet access to Exchange services.
The ransomware targets files with the following file extensions for encryption: .7Z, .APK, .APP, .ASPX, .AVI, .BAK, .BAT, .BIN, .BMP, .C, . CAD, .CER, .CFM, .CGI, .CONFIG, .CPP, .CSS, .CSV, .DAT, .DB, .DBF, .DLL, .DOC, .DOCX, .DWG, .EDB, .EDB, .EML, .EXE, .GO, .GPG, .H, . HTM, .HTML, .INI, .ISO, .JPG, .JS, .JSP, .KEYCHAIN, .LOG, .MDB, .MDF, .MFS, .MSG, .ORA, .PDB, .PDF, .PEM, .PGD, .PHP, .PL, .PNG, .PPS, . PPT, .PPTX, .PS, .PST, .PY, .RAR, .RTF, .SQL, .STM, .TAR, .TEX, .TIF, .TIFF, .TXT, .WPS, .XHTML, .XLS, .XLSX, .XLTM, .XML, .ZIP, .ZIPX
Once the desired file types are found, the files are encrypted and given the file extension .CRYPT. During encryption, the string DEARCRY! is also appended to the beginning of the file header.
FortiGate Antivirus customers using current FortiGate AV definitions are protected from DoejoCrypt/DearCry ransomware variants as follows:
W32/Filecoder.OGE!tr
PossibleThreat.ARN.H
W32/Encoder.OGE!tr.ransom
W32/Encoder!tr
FortiGate IPS
The following IPS signatures, released on March 3 and 4, 2021, stop ransomware such as DearCry that exploits the four Microsoft Exchange Server vulnerabilities listed above. All Fortinet customers with an active subscription and current update are currently protected.
MS.Exchange.Server.ProxyRequestHandler.Remote.Code.Execution
MS.Exchange.Server.UM.Core.Remote.Code.Execution
MS.Exchange.Server.CVE-2021-27065.Remote.Code.Execution
MS.Exchange.Server.CVE-2021-26858.Remote.Code.Execution
FortiEDR/FortiXDR
Tests by FortiGuard Labs show that default installations of FortiEDR and FortiXDR immediately detect and block DoejoCrypt/DearCry ransomware activity.
Microsoft Exchange remediationThe four vulnerabilities targeted by DoejoCrypt/DearCry are CVE-2021-26855, CVE-2021-26857, CVE-2021-26858 and CVE-2021-27065. The attack targets a Microsoft Exchange server, which can receive an untrusted connection from an external source. Once installed, the DearCry Ransomware creates encrypted copies of the attacked files and deletes the originals.
During its encryption routine, the DearCry Ransomware uses an AES-256 encryption to encrypt the attacked files and then uses an RSA-2048 key to encrypt the AES key as well. To make matters worse, the public-key cryptosystem has its public encryption key embedded in the ransomware binary, which means DearCry does not need to contact the attacker's command & control server to encrypt files. This means that it can also encrypt Exchange servers that only allow internet access to Exchange services.
The ransomware targets files with the following file extensions for encryption: .7Z, .APK, .APP, .ASPX, .AVI, .BAK, .BAT, .BIN, .BMP, .C, . CAD, .CER, .CFM, .CGI, .CONFIG, .CPP, .CSS, .CSV, .DAT, .DB, .DBF, .DLL, .DOC, .DOCX, .DWG, .EDB, .EDB, .EML, .EXE, .GO, .GPG, .H, . HTM, .HTML, .INI, .ISO, .JPG, .JS, .JSP, .KEYCHAIN, .LOG, .MDB, .MDF, .MFS, .MSG, .ORA, .PDB, .PDF, .PEM, .PGD, .PHP, .PL, .PNG, .PPS, . PPT, .PPTX, .PS, .PST, .PY, .RAR, .RTF, .SQL, .STM, .TAR, .TEX, .TIF, .TIFF, .TXT, .WPS, .XHTML, .XLS, .XLSX, .XLTM, .XML, .ZIP, .ZIPX
Once the desired file types are found, the files are encrypted and given the file extension .CRYPT. During encryption, the string DEARCRY! is also appended to the beginning of the file header.
What are the Fortinet protections for the DearCry ransomware?
FortiGate Antivirus customers using current FortiGate AV definitions are protected from DoejoCrypt/DearCry ransomware variants as follows:
W32/Filecoder.OGE!tr
PossibleThreat.ARN.H
W32/Encoder.OGE!tr.ransom
W32/Encoder!tr
FortiGate IPS
The following IPS signatures, released on March 3 and 4, 2021, stop ransomware such as DearCry that exploits the four Microsoft Exchange Server vulnerabilities listed above. All Fortinet customers with an active subscription and current update are currently protected.
MS.Exchange.Server.ProxyRequestHandler.Remote.Code.Execution
MS.Exchange.Server.UM.Core.Remote.Code.Execution
MS.Exchange.Server.CVE-2021-27065.Remote.Code.Execution
MS.Exchange.Server.CVE-2021-26858.Remote.Code.Execution
FortiEDR/FortiXDR
Tests by FortiGuard Labs show that default installations of FortiEDR and FortiXDR immediately detect and block DoejoCrypt/DearCry ransomware activity.
Out-of-band patches were made available for download by Microsoft on 2 March 2021. It is recommended that all available patches for affected Microsoft Exchange servers are applied immediately if possible.
Furthermore, Microsoft has developed two new tools to detect these attacks. The first, Test-ProxyLogon.ps1, is designed to look for known Indicators of Compromise. The second, ExchangeMitigations.ps1, looks for web shells, which are scripts that grant threat actors remote access and, in some cases, complete control over a compromised server. This script automates all four commands described in the Microsoft Hafnium blog post.
Other remedies
In addition to immediately installing the available patches on Exchange servers, Microsoft recommends restricting untrusted connections or setting up a VPN to separate the Exchange server from external access. However, these remedies only protect against the first part of the attack. Other parts of the attack chain can still be triggered if an attacker already has access or can convince an administrator to open a malicious file via social engineering methods. In the case of DearCry, no external connection is required to begin encrypting files once the malware has been loaded.
Translated from English with DeepL
Corrections and abridgements Simon Schmischke, EnBITCon GmbH
Skip product gallery
FortiEDR - All-in-One Bundle - Discover, Protect und Respond (End of Sale/Life)
Regular price:
€0.00
Related products