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 (20230808 | Detects win.common_magic.)
rule win_common_magic_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2023-12-06"
        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 = "20231130"
        malpedia_hash = "fc8a0e9f343f6d6ded9e7df1a64dac0cc68d7351"
        malpedia_version = "20230808"
        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 = { 8d049d78824100 8b30 8945fc 90 }
            // n = 4, score = 100
            //   8d049d78824100       | lea                 eax, [ebx*4 + 0x418278]
            //   8b30                 | mov                 esi, dword ptr [eax]
            //   8945fc               | mov                 dword ptr [ebp - 4], eax
            //   90                   | nop                 

        $sequence_1 = { 03c0 eb3c 8bd1 b8feffff7f d1ea 2bc2 }
            // n = 6, score = 100
            //   03c0                 | add                 eax, eax
            //   eb3c                 | jmp                 0x3e
            //   8bd1                 | mov                 edx, ecx
            //   b8feffff7f           | mov                 eax, 0x7ffffffe
            //   d1ea                 | shr                 edx, 1
            //   2bc2                 | sub                 eax, edx

        $sequence_2 = { c78578ffffff00000000 c7857cffffff00000000 8d9574ffffff c645fc09 8d8d84feffff }
            // n = 5, score = 100
            //   c78578ffffff00000000     | mov    dword ptr [ebp - 0x88], 0
            //   c7857cffffff00000000     | mov    dword ptr [ebp - 0x84], 0
            //   8d9574ffffff         | lea                 edx, [ebp - 0x8c]
            //   c645fc09             | mov                 byte ptr [ebp - 4], 9
            //   8d8d84feffff         | lea                 ecx, [ebp - 0x17c]

        $sequence_3 = { 6689855cffffff b8feffff7f 2bc1 c7856cffffff00000000 c78570ffffff07000000 }
            // n = 5, score = 100
            //   6689855cffffff       | mov                 word ptr [ebp - 0xa4], ax
            //   b8feffff7f           | mov                 eax, 0x7ffffffe
            //   2bc1                 | sub                 eax, ecx
            //   c7856cffffff00000000     | mov    dword ptr [ebp - 0x94], 0
            //   c78570ffffff07000000     | mov    dword ptr [ebp - 0x90], 7

        $sequence_4 = { 33c9 8bc1 3914c5e84a4100 7408 }
            // n = 4, score = 100
            //   33c9                 | xor                 ecx, ecx
            //   8bc1                 | mov                 eax, ecx
            //   3914c5e84a4100       | cmp                 dword ptr [eax*8 + 0x414ae8], edx
            //   7408                 | je                  0xa

        $sequence_5 = { c7459c65007800 c745a065000000 83f817 0f82140c0000 83bd58ffffff08 8d8544ffffff }
            // n = 6, score = 100
            //   c7459c65007800       | mov                 dword ptr [ebp - 0x64], 0x780065
            //   c745a065000000       | mov                 dword ptr [ebp - 0x60], 0x65
            //   83f817               | cmp                 eax, 0x17
            //   0f82140c0000         | jb                  0xc1a
            //   83bd58ffffff08       | cmp                 dword ptr [ebp - 0xa8], 8
            //   8d8544ffffff         | lea                 eax, [ebp - 0xbc]

        $sequence_6 = { 51 50 51 ffb580feffff 8d8d5cffffff }
            // n = 5, score = 100
            //   51                   | push                ecx
            //   50                   | push                eax
            //   51                   | push                ecx
            //   ffb580feffff         | push                dword ptr [ebp - 0x180]
            //   8d8d5cffffff         | lea                 ecx, [ebp - 0xa4]

        $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 = { 8b0c8570804100 8a043b 03ce 8b75dc 03cb 43 }
            // n = 6, score = 100
            //   8b0c8570804100       | mov                 ecx, dword ptr [eax*4 + 0x418070]
            //   8a043b               | mov                 al, byte ptr [ebx + edi]
            //   03ce                 | add                 ecx, esi
            //   8b75dc               | mov                 esi, dword ptr [ebp - 0x24]
            //   03cb                 | add                 ecx, ebx
            //   43                   | inc                 ebx

        $sequence_9 = { 2bc2 3bc8 760e b8ffffff7f befeffff7f 03c0 }
            // n = 6, score = 100
            //   2bc2                 | sub                 eax, edx
            //   3bc8                 | cmp                 ecx, eax
            //   760e                 | jbe                 0x10
            //   b8ffffff7f           | mov                 eax, 0x7fffffff
            //   befeffff7f           | mov                 esi, 0x7ffffffe
            //   03c0                 | add                 eax, eax

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