← Back to SOC feed Coverage →

Detects an executable encrypted with a 4 byte XOR (also used for Derusbi Trojan)

yara HIGH Yara-Rules
backdoorcommunity
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-05-21T23:00:01Z · Confidence: medium

Hunt Hypothesis

The hypothesis is that the detection identifies adversaries using a 4-byte XOR encryption method to obfuscate malicious payloads, a technique commonly associated with the Derusbi Trojan. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential advanced persistent threats that may evade traditional detection mechanisms.

YARA Rule

rule XOR_4byte_Key
{

    meta:
        description = "Detects an executable encrypted with a 4 byte XOR (also used for Derusbi Trojan)"
        author = "Florian Roth"
        reference = "http://blog.airbuscybersecurity.com/post/2015/11/Newcomers-in-the-Derusbi-family"
        date = "2015-12-15"
        score = 60

   strings:
      /* Op Code */
      $s1 = { 85 C9 74 0A 31 06 01 1E 83 C6 04 49 EB F2 }
      /*
      test    ecx, ecx
      jz      short loc_590170
      xor     [esi], eax
      add     [esi], ebx
      add     esi, 4
      dec     ecx
      jmp     short loc_590162
      */

   condition:
      uint16(0) == 0x5a4d and filesize < 900KB and all of them
}

Deployment Notes

This YARA rule can be deployed in the following contexts:

This rule contains 1 string patterns in its detection logic.

References

False Positive Guidance

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