← Back to SOC feed Coverage →

DNSCalcStyleEncodeAndDecode

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-08T11:00:00Z · Confidence: medium

Hunt Hypothesis

This detection identifies adversary behavior where malware utilizes custom encoding and decoding mechanisms within DNS traffic to establish covert command-and-control channels or exfiltrate data without triggering standard signature-based alerts. The SOC team should proactively hunt for this pattern in Azure Sentinel because low-severity, logic-driven anomalies often indicate early-stage reconnaissance or persistent threats that evade traditional perimeter defenses by mimicking legitimate DNS query structures.

YARA Rule

rule DNSCalcStyleEncodeAndDecode: sharedcode
{
	meta:
		copyright = "2015 Novetta Solutions"
		author = "Novetta Threat Research & Interdiction Group - [email protected]"
		Source = "975522bc3e07f7aa2c4a5457e6cc16c49a148b9f731134b8971983225835577e"

	strings:
	/*
		8A 10     mov     dl, [eax]
		80 F2 73  xor     dl, 73h					<--- for decoding and encoding, this and
		80 EA 3A  sub     dl, 3Ah					<--- this could be reversed, but the sig holds since both are 0x80
		88 10     mov     [eax], dl
		40        inc     eax
		49        dec     ecx
		75 F2     jnz     short loc_1000403C
	*/

	$a = {8A ?? 80 ?? ?? 80 ?? ?? 88 ?? 4? 4? 75 ?? }

	condition:
		$a in ((pe.sections[pe.section_index(".text")].raw_data_offset)..(pe.sections[pe.section_index(".text")].raw_data_offset + pe.sections[pe.section_index(".text")].raw_data_size))
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 1 string patterns in its detection logic.

False Positive Guidance

Here are 5 specific false positive scenarios for the DNSCalcStyleEncodeAndDecode detection rule, including suggested filters and exclusions tailored for an enterprise environment:

Original source: https://github.com/Yara-Rules/rules/blob/main/malware/Operation_Blockbuster/sharedcode.yara