← Back to SOC feed Coverage →

RC4SboxKeyGen

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

Hunt Hypothesis

This hypothesis posits that adversaries are utilizing custom or obfuscated malware leveraging the RC4 stream cipher’s S-box key generation routine to evade signature-based detection within Azure workloads. The SOC team should proactively hunt for this specific cryptographic footprint in Azure Sentinel because its low severity classification may cause it to be overlooked, yet its presence often signals early-stage lateral movement or command-and-control activity that requires deeper behavioral analysis before escalating to a high-severity incident.

YARA Rule

rule RC4SboxKeyGen: sharedcode
{
	meta:
		copyright = "2015 Novetta Solutions"
		author = "Novetta Threat Research & Interdiction Group - trig@novetta.com"
		Source = "RT_RCDATA_101.bin.bin"

	strings:
	/*
		8A 4C 04 08        mov     cl, [esp+eax+108h+sbox]; cl = sbox[i]
		8B D0              mov     edx, eax
		81 E2 0F 00 00 80  and     edx, 8000000Fh  ; i % 16
		79 05              jns     short loc_10003AC8; dl = key[i & 16]
		4A                 dec     edx
		83 CA F0           or      edx, 0FFFFFFF0h
		42                 inc     edx
	*/

	$a = {	8A [3] 	8B ?? 	81 ?? 0F 00 00 80 79 ?? 4? 83 ?? F0 4? 	}

	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 RC4SboxKeyGen detection rule in an enterprise environment, along with recommended filters:

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