SYMBOLCOMMON_NAMEaka. SYNONYMS
win.maggie (Back to overview)

Maggie

VTCollection    

According to DCSO, this malware is written as a Extended Stored Procedure for a MSSQL server. The backdoor has capabilities to bruteforce logins to other MSSQL servers, adding a special hardcoded backdoor user in the case of successfully bruteforcing admin logins.

References
2022-10-12SentinelOneAmitai Ben Shushan Ehrlich, Joey Chen
WIP19 Espionage | New Chinese APT Targets IT Service Providers and Telcos With Signed Malware
Maggie ScreenCap WIP19
2022-10-11Medium (@DCSO_CyTec)Axel Wauer, Denis Szadkowski, Johann Aydinbas
Tracking down Maggie
Maggie
2022-10-04Medium (@DCSO_CyTec)Axel Wauer, Johann Aydinbas
MSSQL, meet Maggie
Maggie
Yara Rules
[TLP:WHITE] win_maggie_auto (20230808 | Detects win.maggie.)
rule win_maggie_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2023-12-06"
        version = "1"
        description = "Detects win.maggie."
        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.maggie"
        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 = { ff15???????? e8???????? 84c0 74ec e8???????? }
            // n = 5, score = 300
            //   ff15????????         |                     
            //   e8????????           |                     
            //   84c0                 | cmp                 dword ptr [eax + 0xf0], 0
            //   74ec                 | je                  0x1e97
            //   e8????????           |                     

        $sequence_1 = { ff15???????? 83f8ff 750f ff15???????? 2d33270000 f7d8 1bc0 }
            // n = 7, score = 300
            //   ff15????????         |                     
            //   83f8ff               | dec                 eax
            //   750f                 | mov                 dword ptr [esp + 0x20], eax
            //   ff15????????         |                     
            //   2d33270000           | dec                 eax
            //   f7d8                 | lea                 eax, [esp + 0x60]
            //   1bc0                 | inc                 esp

        $sequence_2 = { 83f8ff 750f ff15???????? 2d33270000 f7d8 1bc0 }
            // n = 6, score = 300
            //   83f8ff               | mov                 dword ptr [esp + 0x20], eax
            //   750f                 | cmp                 eax, -1
            //   ff15????????         |                     
            //   2d33270000           | je                  0x1b05
            //   f7d8                 | mov                 eax, dword ptr [esp + 0x98]
            //   1bc0                 | test                eax, eax

        $sequence_3 = { 750f ff15???????? 2d33270000 f7d8 1bc0 }
            // n = 5, score = 300
            //   750f                 | mov                 ecx, edi
            //   ff15????????         |                     
            //   2d33270000           | dec                 eax
            //   f7d8                 | lea                 edx, [0x1fbd8]
            //   1bc0                 | inc                 ecx

        $sequence_4 = { ff15???????? 83f8ff 750f ff15???????? 2d33270000 f7d8 }
            // n = 6, score = 300
            //   ff15????????         |                     
            //   83f8ff               | dec                 eax
            //   750f                 | lea                 ecx, [esp + 0x120]
            //   ff15????????         |                     
            //   2d33270000           | mov                 edx, 0x3fe
            //   f7d8                 | inc                 ecx

        $sequence_5 = { 83f8ff 750f ff15???????? 2d33270000 f7d8 }
            // n = 5, score = 300
            //   83f8ff               | dec                 eax
            //   750f                 | lea                 ecx, [0x29d85]
            //   ff15????????         |                     
            //   2d33270000           | dec                 eax
            //   f7d8                 | lea                 edx, [0x29d3a]

        $sequence_6 = { b8ff000000 663b05???????? 7505 e8???????? e8???????? 84c0 }
            // n = 6, score = 300
            //   b8ff000000           | dec                 eax
            //   663b05????????       |                     
            //   7505                 | mov                 ecx, eax
            //   e8????????           |                     
            //   e8????????           |                     
            //   84c0                 | dec                 eax

        $sequence_7 = { 663b05???????? 7505 e8???????? e8???????? 84c0 }
            // n = 5, score = 300
            //   663b05????????       |                     
            //   7505                 | je                  0x416
            //   e8????????           |                     
            //   e8????????           |                     
            //   84c0                 | inc                 esp

        $sequence_8 = { 7511 ff15???????? 85c0 7407 33c0 }
            // n = 5, score = 300
            //   7511                 | dec                 eax
            //   ff15????????         |                     
            //   85c0                 | mov                 ecx, edi
            //   7407                 | test                eax, eax
            //   33c0                 | jle                 0xd96

        $sequence_9 = { 7511 ff15???????? 85c0 7407 33c0 e9???????? }
            // n = 6, score = 300
            //   7511                 | pop                 ebp
            //   ff15????????         |                     
            //   85c0                 | pop                 ebx
            //   7407                 | dec                 eax
            //   33c0                 | xor                 ecx, esp
            //   e9????????           |                     

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