← Back to SOC feed Coverage →

Detects Petya Ransomware

yara LOW Yara-Rules
communityransomware
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 rule identifies adversary behavior characterized by the specific encryption patterns and system file modifications indicative of a Petya ransomware infection within Azure Sentinel. Proactively hunting for this signature is essential to validate detection efficacy against known variants and ensure rapid containment before the malware can propagate across critical workloads, despite its current low severity classification.

YARA Rule

rule Petya_Ransomware {
	meta:
		description = "Detects Petya Ransomware"
		author = "Florian Roth"
		reference = "http://www.heise.de/newsticker/meldung/Erpressungs-Trojaner-Petya-riegelt-den-gesamten-Rechner-ab-3150917.html"
		date = "2016-03-24"
		hash = "26b4699a7b9eeb16e76305d843d4ab05e94d43f3201436927e13b3ebafa90739"
	strings:
		$a1 = "<description>WinRAR SFX module</description>" fullword ascii

		$s1 = "BX-Proxy-Manual-Auth" fullword wide
		$s2 = "<!--The ID below indicates application support for Windows 10 -->" fullword ascii
		$s3 = "X-HTTP-Attempts" fullword wide
		$s4 = "@CommandLineMode" fullword wide
		$s5 = "X-Retry-After" fullword wide
	condition:
		uint16(0) == 0x5a4d and filesize < 500KB and $a1 and 3 of ($s*)
}

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 4 specific false positive scenarios for the Detects Petya Ransomware rule in an enterprise environment, along with suggested filters and exclusions:

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