SYMBOLCOMMON_NAMEaka. SYNONYMS
win.common_magic (Back to overview)

CommonMagic

VTCollection    

There is no description at this point.

References
2023-05-19Kaspersky LabsGeorgy Kucherin, Igor Kuznetsov, Leonid Bezvershenko
CloudWizard APT: the bad magic story goes on
PowerMagic CloudWizard CommonMagic Prikormka
2023-03-21Kaspersky LabsGeorgy Kucherin, Igor Kuznetsov, Leonid Bezvershenko
Bad magic: new APT found in the area of Russo-Ukrainian conflict
PowerMagic CommonMagic
2023-03-21Kaspersky LabsGeorgy Kucherin, Igor Kuznetsov, Leonid Bezvershenko
Bad magic: new APT found in the area of Russo-Ukrainian conflict
PowerMagic CommonMagic RedStinger
Yara Rules
[TLP:WHITE] win_common_magic_auto (20260504 | Detects win.common_magic.)
rule win_common_magic_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-05-04"
        version = "1"
        description = "Detects win.common_magic."
        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.common_magic"
        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 = { 0f438d14ffffff 837f1408 7202 8b37 8b5710 }
            // n = 5, score = 100
            //   0f438d14ffffff       | cmovae              ecx, dword ptr [ebp - 0xec]
            //   837f1408             | cmp                 dword ptr [edi + 0x14], 8
            //   7202                 | jb                  4
            //   8b37                 | mov                 esi, dword ptr [edi]
            //   8b5710               | mov                 edx, dword ptr [edi + 0x10]

        $sequence_1 = { 8b8d54ffffff 2bc1 c745dc43006c00 c745e065006100 c745e46e002e00 c745e865007800 c745ec65000000 }
            // n = 7, score = 100
            //   8b8d54ffffff         | mov                 ecx, dword ptr [ebp - 0xac]
            //   2bc1                 | sub                 eax, ecx
            //   c745dc43006c00       | mov                 dword ptr [ebp - 0x24], 0x6c0043
            //   c745e065006100       | mov                 dword ptr [ebp - 0x20], 0x610065
            //   c745e46e002e00       | mov                 dword ptr [ebp - 0x1c], 0x2e006e
            //   c745e865007800       | mov                 dword ptr [ebp - 0x18], 0x780065
            //   c745ec65000000       | mov                 dword ptr [ebp - 0x14], 0x65

        $sequence_2 = { 6bc938 8b048570804100 0fb6440828 83e040 5d c3 e8???????? }
            // n = 7, score = 100
            //   6bc938               | imul                ecx, ecx, 0x38
            //   8b048570804100       | mov                 eax, dword ptr [eax*4 + 0x418070]
            //   0fb6440828           | movzx               eax, byte ptr [eax + ecx + 0x28]
            //   83e040               | and                 eax, 0x40
            //   5d                   | pop                 ebp
            //   c3                   | ret                 
            //   e8????????           |                     

        $sequence_3 = { 8a8750754100 08441619 42 0fb64101 }
            // n = 4, score = 100
            //   8a8750754100         | mov                 al, byte ptr [edi + 0x417550]
            //   08441619             | or                  byte ptr [esi + edx + 0x19], al
            //   42                   | inc                 edx
            //   0fb64101             | movzx               eax, byte ptr [ecx + 1]

        $sequence_4 = { 8d45c8 897dac b941000000 c745cc4f004700 }
            // n = 4, score = 100
            //   8d45c8               | lea                 eax, [ebp - 0x38]
            //   897dac               | mov                 dword ptr [ebp - 0x54], edi
            //   b941000000           | mov                 ecx, 0x41
            //   c745cc4f004700       | mov                 dword ptr [ebp - 0x34], 0x47004f

        $sequence_5 = { c78598feffff07000000 66898584feffff 83f908 7235 8b95fcfeffff 8d0c4d02000000 }
            // n = 6, score = 100
            //   c78598feffff07000000     | mov    dword ptr [ebp - 0x168], 7
            //   66898584feffff       | mov                 word ptr [ebp - 0x17c], ax
            //   83f908               | cmp                 ecx, 8
            //   7235                 | jb                  0x37
            //   8b95fcfeffff         | mov                 edx, dword ptr [ebp - 0x104]
            //   8d0c4d02000000       | lea                 ecx, [ecx*2 + 2]

        $sequence_6 = { 746e 8b4dfc 8d7823 8b55f8 83e7e0 8947fc eb19 }
            // n = 7, score = 100
            //   746e                 | je                  0x70
            //   8b4dfc               | mov                 ecx, dword ptr [ebp - 4]
            //   8d7823               | lea                 edi, [eax + 0x23]
            //   8b55f8               | mov                 edx, dword ptr [ebp - 8]
            //   83e7e0               | and                 edi, 0xffffffe0
            //   8947fc               | mov                 dword ptr [edi - 4], eax
            //   eb19                 | jmp                 0x1b

        $sequence_7 = { 51 ffb580feffff 8d8d5cffffff e8???????? 838d78feffff06 8d8de4feffff 83bdf8feffff08 }
            // n = 7, score = 100
            //   51                   | push                ecx
            //   ffb580feffff         | push                dword ptr [ebp - 0x180]
            //   8d8d5cffffff         | lea                 ecx, [ebp - 0xa4]
            //   e8????????           |                     
            //   838d78feffff06       | or                  dword ptr [ebp - 0x188], 6
            //   8d8de4feffff         | lea                 ecx, [ebp - 0x11c]
            //   83bdf8feffff08       | cmp                 dword ptr [ebp - 0x108], 8

        $sequence_8 = { 668b040e 663b01 7517 83c102 83ea01 75ef 8b45e8 }
            // n = 7, score = 100
            //   668b040e             | mov                 ax, word ptr [esi + ecx]
            //   663b01               | cmp                 ax, word ptr [ecx]
            //   7517                 | jne                 0x19
            //   83c102               | add                 ecx, 2
            //   83ea01               | sub                 edx, 1
            //   75ef                 | jne                 0xfffffff1
            //   8b45e8               | mov                 eax, dword ptr [ebp - 0x18]

        $sequence_9 = { 8d8068754100 8945e4 803800 8bc8 7435 8a4101 84c0 }
            // n = 7, score = 100
            //   8d8068754100         | lea                 eax, [eax + 0x417568]
            //   8945e4               | mov                 dword ptr [ebp - 0x1c], eax
            //   803800               | cmp                 byte ptr [eax], 0
            //   8bc8                 | mov                 ecx, eax
            //   7435                 | je                  0x37
            //   8a4101               | mov                 al, byte ptr [ecx + 1]
            //   84c0                 | test                al, al

    condition:
        7 of them and filesize < 212992
}
Download all Yara Rules