← Back to SOC feed Coverage →

Based on spreading petya version: 2017-06-28

yara LOW Yara-Rules
community
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at Yara-Rules →
Retrieved: 2026-07-11T23:00:01Z · Confidence: medium

Hunt Hypothesis

This hunt targets adversaries executing Petya-style ransomware propagation by identifying specific file system modifications and lateral movement patterns characteristic of the June 2017 outbreak within Azure Sentinel logs. Proactively hunting for this behavior is critical because early detection of these spreading signatures allows the SOC team to isolate affected endpoints before encryption spreads across the network, mitigating potential business disruption despite the rule’s current low severity classification.

YARA Rule

rule petya_eternalblue : petya_eternalblue {
    meta:
        author      = "blueliv"
        description =  "Based on spreading petya version: 2017-06-28"
        reference = "https://blueliv.com/petya-ransomware-cyber-attack-is-spreading-across-the-globe-part-2/"
    strings:
        /* Some commands executed by the Petya variant */
       $cmd01 = "schtasks %ws/Create /SC once /TN \"\" /TR \"%ws\" /ST %02d:%0" wide
       $cmd02 = "shutdown.exe /r /f" wide
       $cmd03 = "%s \\\\%s -accepteula -s" wide
       $cmd04 = "process call create \"C:\\Windows\\System32\\rundll32.exe \\\"C:\\Windows\\%s\\\" #1" wide
       /* Strings of encrypted files */
       $str01 = "they have been encrypted. Perhaps you are busy looking" wide
        /* MBR/VBR payload */
        $mbr01 = {00 00 00 55 aa e9 ?? ??}
    condition:
        all of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 6 string patterns in its detection logic.

References

False Positive Guidance

Here are four specific false positive scenarios for the “Spreading Petya” detection rule in an enterprise environment, including suggested filters and exclusions:

Original source: https://github.com/Yara-Rules/rules/blob/main/malware/RANSOM_Petya_MS17_010.yar