SYMBOLCOMMON_NAMEaka. SYNONYMS
win.equationdrug (Back to overview)

EquationDrug

Actor(s): Equation Group

VTCollection     URLhaus        

There is no description at this point.

References
2017-03-30Artem Baranov
EquationDrug rootkit analysis (mstcp32.sys)
EquationDrug
2015-03-11Kaspersky LabsGReAT
Inside the EquationDrug Espionage Platform
EquationDrug
2015-02-16Kaspersky LabsGReAT
Equation: The Death Star of Malware Galaxy
DoubleFantasy EquationDrug Fanny GROK
Yara Rules
[TLP:WHITE] win_equationdrug_auto (20260504 | Detects win.equationdrug.)
rule win_equationdrug_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-05-04"
        version = "1"
        description = "Detects win.equationdrug."
        info = "autogenerated rule brought to you by yara-signator"
        tool = "yara-signator v0.6.0"
        signator_config = "callsandjumps;datarefs;binvalue"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.equationdrug"
        malpedia_rule_date = "20260422"
        malpedia_hash = "a182e35da64e6d71cb55f125c4d4225196523f14"
        malpedia_version = "20260504"
        malpedia_license = "CC BY-SA 4.0"
        malpedia_sharing = "TLP:WHITE"

    /* DISCLAIMER
     * The strings used in this rule have been automatically selected from the
     * disassembly of memory dumps and unpacked files, using YARA-Signator.
     * The code and documentation is published here:
     * https://github.com/fxb-cocacoding/yara-signator
     * As Malpedia is used as data source, please note that for a given
     * number of families, only single samples are documented.
     * This likely impacts the degree of generalization these rules will offer.
     * Take the described generation method also into consideration when you
     * apply the rules in your use cases and assign them confidence levels.
     */


    strings:
        $sequence_0 = { e8???????? 8b4c242c 51 e8???????? 83c404 b805030000 5f }
            // n = 7, score = 100
            //   e8????????           |                     
            //   8b4c242c             | mov                 ecx, dword ptr [esp + 0x2c]
            //   51                   | push                ecx
            //   e8????????           |                     
            //   83c404               | add                 esp, 4
            //   b805030000           | mov                 eax, 0x305
            //   5f                   | pop                 edi

        $sequence_1 = { 8b442464 8b6c246c 03f8 66897c2410 33ff 6685db 7679 }
            // n = 7, score = 100
            //   8b442464             | mov                 eax, dword ptr [esp + 0x64]
            //   8b6c246c             | mov                 ebp, dword ptr [esp + 0x6c]
            //   03f8                 | add                 edi, eax
            //   66897c2410           | mov                 word ptr [esp + 0x10], di
            //   33ff                 | xor                 edi, edi
            //   6685db               | test                bx, bx
            //   7679                 | jbe                 0x7b

        $sequence_2 = { 895c242c 895c2430 c7442474ffffffff e8???????? b807080000 e9???????? 33ff }
            // n = 7, score = 100
            //   895c242c             | mov                 dword ptr [esp + 0x2c], ebx
            //   895c2430             | mov                 dword ptr [esp + 0x30], ebx
            //   c7442474ffffffff     | mov                 dword ptr [esp + 0x74], 0xffffffff
            //   e8????????           |                     
            //   b807080000           | mov                 eax, 0x807
            //   e9????????           |                     
            //   33ff                 | xor                 edi, edi

        $sequence_3 = { 8b6c2430 668b442434 8bd3 893a 896a04 66894208 83c60a }
            // n = 7, score = 100
            //   8b6c2430             | mov                 ebp, dword ptr [esp + 0x30]
            //   668b442434           | mov                 ax, word ptr [esp + 0x34]
            //   8bd3                 | mov                 edx, ebx
            //   893a                 | mov                 dword ptr [edx], edi
            //   896a04               | mov                 dword ptr [edx + 4], ebp
            //   66894208             | mov                 word ptr [edx + 8], ax
            //   83c60a               | add                 esi, 0xa

        $sequence_4 = { 83c434 c3 8b4514 8b08 33c0 8bd1 c1e902 }
            // n = 7, score = 100
            //   83c434               | add                 esp, 0x34
            //   c3                   | ret                 
            //   8b4514               | mov                 eax, dword ptr [ebp + 0x14]
            //   8b08                 | mov                 ecx, dword ptr [eax]
            //   33c0                 | xor                 eax, eax
            //   8bd1                 | mov                 edx, ecx
            //   c1e902               | shr                 ecx, 2

        $sequence_5 = { 8b4c2410 890f 83c704 3bf8 75f3 83460804 8b4500 }
            // n = 7, score = 100
            //   8b4c2410             | mov                 ecx, dword ptr [esp + 0x10]
            //   890f                 | mov                 dword ptr [edi], ecx
            //   83c704               | add                 edi, 4
            //   3bf8                 | cmp                 edi, eax
            //   75f3                 | jne                 0xfffffff5
            //   83460804             | add                 dword ptr [esi + 8], 4
            //   8b4500               | mov                 eax, dword ptr [ebp]

        $sequence_6 = { b800060000 5b 8b4c2468 64890d00000000 83c474 c3 8b9c2488000000 }
            // n = 7, score = 100
            //   b800060000           | mov                 eax, 0x600
            //   5b                   | pop                 ebx
            //   8b4c2468             | mov                 ecx, dword ptr [esp + 0x68]
            //   64890d00000000       | mov                 dword ptr fs:[0], ecx
            //   83c474               | add                 esp, 0x74
            //   c3                   | ret                 
            //   8b9c2488000000       | mov                 ebx, dword ptr [esp + 0x88]

        $sequence_7 = { 03fb 81c300400000 f3a5 42 33f6 eba9 }
            // n = 6, score = 100
            //   03fb                 | add                 edi, ebx
            //   81c300400000         | add                 ebx, 0x4000
            //   f3a5                 | rep movsd           dword ptr es:[edi], dword ptr [esi]
            //   42                   | inc                 edx
            //   33f6                 | xor                 esi, esi
            //   eba9                 | jmp                 0xffffffab

        $sequence_8 = { 51 6880000000 8d94248c000000 6a01 52 e8???????? 83c410 }
            // n = 7, score = 100
            //   51                   | push                ecx
            //   6880000000           | push                0x80
            //   8d94248c000000       | lea                 edx, [esp + 0x8c]
            //   6a01                 | push                1
            //   52                   | push                edx
            //   e8????????           |                     
            //   83c410               | add                 esp, 0x10

        $sequence_9 = { 51 8944241c 89542424 89742428 8944242c 89542434 89742438 }
            // n = 7, score = 100
            //   51                   | push                ecx
            //   8944241c             | mov                 dword ptr [esp + 0x1c], eax
            //   89542424             | mov                 dword ptr [esp + 0x24], edx
            //   89742428             | mov                 dword ptr [esp + 0x28], esi
            //   8944242c             | mov                 dword ptr [esp + 0x2c], eax
            //   89542434             | mov                 dword ptr [esp + 0x34], edx
            //   89742438             | mov                 dword ptr [esp + 0x38], esi

    condition:
        7 of them and filesize < 449536
}
[TLP:WHITE] win_equationdrug_w0   (20170517 | EquationDrug - Backdoor driven by network sniffer - mstcp32.sys, fat32.sys)
/* EquationDrug Update 11.03.2015 - http://securelist.com/blog/research/69203/inside-the-equationdrug-espionage-platform/ */

rule win_equationdrug_w0 {
	meta:
		description = "EquationDrug - Backdoor driven by network sniffer - mstcp32.sys, fat32.sys"
		author = "Florian Roth @4nc4p"
		reference = "http://securelist.com/blog/research/69203/inside-the-equationdrug-espionage-platform/"
		date = "2015/03/11"
		hash = "26e787997a338d8111d96c9a4c103cf8ff0201ce"
		source = "https://github.com/mattulm/sfiles_yara/blob/master/malware/Equation.yar"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.equationdrug"
        malpedia_version = "20170517"
        malpedia_license = "CC BY-NC-SA 4.0"
        malpedia_sharing = "TLP:WHITE"
	strings:
		$s0 = "Microsoft(R) Windows (TM) Operating System" fullword wide
		$s1 = "\\Registry\\User\\CurrentUser\\" fullword wide
		$s3 = "sys\\mstcp32.dbg" fullword ascii
		$s7 = "mstcp32.sys" fullword wide
		$s8 = "p32.sys" fullword ascii
		$s9 = "\\Device\\%ws_%ws" fullword wide
		$s10 = "\\DosDevices\\%ws" fullword wide
		$s11 = "\\Device\\%ws" fullword wide
	condition:
		all of them
}
Download all Yara Rules