This hypothesis posits that adversaries are deploying Termite ransomware by executing specific file encryption and process injection behaviors within our Azure environment. Proactive hunting is essential despite the low severity rating to identify early-stage infection patterns before they escalate into widespread data unavailability incidents.
rule termite_ransomware {
meta:
description = "Rule to detect Termite Ransomware"
author = "Marc Rivero | @seifreed"
reference = "https://www.bleepingcomputer.com/news/security/the-week-in-ransomware-august-31st-2018-devs-on-vacation/"
strings:
$s1 = "C:\\Windows\\SysNative\\mswsock.dll" fullword ascii
$s2 = "C:\\Windows\\SysWOW64\\mswsock.dll" fullword ascii
$s3 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\Termite.exe" fullword ascii
$s4 = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\Payment.exe" fullword ascii
$s5 = "C:\\Windows\\Termite.exe" fullword ascii
$s6 = "\\Shell\\Open\\Command\\" fullword ascii
$s7 = "[email protected]" fullword ascii
$s8 = "(*.JPG;*.PNG;*.BMP;*.GIF;*.ICO;*.CUR)|*.JPG;*.PNG;*.BMP;*.GIF;*.ICO;*.CUR|JPG" fullword ascii
condition:
( uint16(0) == 0x5a4d and filesize < 6000KB ) and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 8 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the Termite Ransomware detection rule in an enterprise environment, including suggested filters or exclusions:
Enterprise Backup Agent File Encryption
NT SERVICE\VeeamTransportService) or filter out file paths located within designated backup staging directories (e.g., D:\VeeamBackup\Staging).Antivirus Real-Time Scanning and Quarantine
MsMpEng.exe, csfalcon.exe) and exclude file operations occurring in the vendor’s specific quarantine paths (e.g., C:\ProgramData\Microsoft\Windows Defender\Quarantine).Database Maintenance and Index Rebuild Jobs
.mdf and .ldf files