The detection rule identifies potential malicious activity through the presence of a specific MD5 hash, which may indicate the use of known or unknown malicious files. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify and mitigate potential threats early, especially given the low severity rating which may mask more significant underlying activity.
YARA Rule
rule md5_9b59cb5b557e46e1487ef891cedaccf7 {
strings:
$jpg = { FF D8 FF E0 ?? ?? 4A 46 49 46 00 01 }
/*
// https://en.wikipedia.org/wiki/List_of_file_signatures
// magic module is not standard compiled in on our platform
// otherwise: condition: magic.mime_type() == /^image/
// $jpg = { 4A 46 49 46 00 01 }
*/
$php = "<?php"
condition: ($jpg at 0) and $php
}
This YARA rule can be deployed in the following contexts:
This rule contains 1 string patterns in its detection logic.
Scenario: A legitimate system update using Windows Update or WSUS that includes a file with the MD5 hash 9b59cb5b557e46e1487ef891cedaccf7.
Filter/Exclusion: Check the file path against known Windows update directories (e.g., C:\Windows\Temp, C:\Windows\SoftwareDistribution). Use a filter like:
file.path != "C:\Windows\*" and file.path != "C:\Program Files\*"
Scenario: A scheduled backup job using Veeam or Acronis that temporarily stores or processes files with the same MD5 hash during the backup process.
Filter/Exclusion: Exclude files associated with backup processes by checking the process name or parent process:
process.name != "veeam.exe" and process.name != "acronis.exe"
Scenario: A third-party application such as 7-Zip or WinRAR that uses the MD5 hash for internal checksum validation during file extraction or compression.
Filter/Exclusion: Exclude files created or modified by compression tools:
process.name != "7z.exe" and process.name != "rar.exe"
Scenario: A system integrity check or Windows Defender scan that temporarily generates or processes files with the same MD5 hash during a scan.
Filter/Exclusion: Exclude files related to Windows Defender or system integrity checks:
process.name != "MsMpEng.exe" and file.path != "C:\Windows\System32\*"
Scenario: A custom script or tool used by the IT department for file validation or