The hypothesis is that the detected behavior may indicate the presence of a wiper malware variant attempting to erase data by overwriting disk sectors. A SOC team should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential data destruction threats early, especially when combined with other indicators of compromise.
rule r4_wiper_1
{
meta:
source = "NCCIC Partner"
date = "2017-12-12"
report = "https://www.us-cert.gov/sites/default/files/publications/MAR-10135536.11.WHITE.pdf"
report = "https://www.us-cert.gov/HIDDEN-COBRA-North-Korean-Malicious-Cyber-Activity"
strings:
$mbr_code = { 33 C0 8E D0 BC 00 7C FB 50 07 50 1F FC BE 5D 7C 33 C9 41 81 F9 00 ?? 74 24 B4 43 B0 00 CD 13 FE C2 80 FA 84 7C F3 B2 80 BF 65 7C 81 05 00 04 83 55 02 00 83 55 04 00 83 55 06 00 EB D5 BE 4D 7C B4 43 B0 00 CD 13 33 C9 BE 5D 7C EB C5 }
$controlServiceFoundlnBoth = { 83 EC 1C 57 68 3F 00 0F 00 6A 00 6A 00 FF 15 ?? ?? ?? ?? 8B F8 85 FF 74 44 8B 44 24 24 53 56 6A 24 50 57 FF 15 ?? ?? ?? ?? 8B 1D ?? ?? ?? ?? 8B F0 85 F6 74 1C 8D 4C 24 0C 51 6A 01 56 FF 15 ?? ?? ?? ?? 68 E8 03 00 00 FF 15 ?? ?? ?? ?? 56 FF D3 57 FF D3 5E 5B 33 C0 5F 83 C4 1C C3 33 C0 5F 83 C4 1C C3 }
condition:
uint16(0) == 0x5a4d and uint16(uint32(0x3c)) == 0x4550 and any of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 2 string patterns in its detection logic.
Scenario: Scheduled system maintenance or cleanup task using Windows Task Scheduler
Filter/Exclusion: Check for Task Scheduler job names or paths containing Cleanup, Maintenance, or Disk Cleanup in the event log or process tree.
Scenario: Legitimate use of Windows Disk Imaging Tools (e.g., Macrium Reflect, Acronis True Image) for backup purposes
Filter/Exclusion: Filter by process names like MacriumReflect.exe, AcronisTrueImage.exe, or check for known backup directories in the file system.
Scenario: Windows Update or Group Policy deployment that temporarily modifies system files
Filter/Exclusion: Exclude processes related to wuauclt.exe, gupdate.exe, or check for registry keys associated with Windows Update or Group Policy.
Scenario: Disk Defragmentation task initiated by Defraggler or built-in Disk Defragmenter
Filter/Exclusion: Filter by process names like Defraggler.exe or check for file system operations related to defrag or fragmentation.
Scenario: Antivirus or Endpoint Protection tool performing a full system scan (e.g., Kaspersky, Bitdefender, Malwarebytes)
Filter/Exclusion: Exclude processes like KavService.exe, bdagent.exe, or mbam.exe, and filter by known safe file access patterns during scans.