SYMBOLCOMMON_NAMEaka. SYNONYMS
win.cosmicduke (Back to overview)

CosmicDuke

Actor(s): APT29


There is no description at this point.

References
2022-08-29Cyfirmacyfirma
@online{cyfirma:20220829:cosmicduke:9cecbd7, author = {cyfirma}, title = {{CosmicDuke Malware Analysis Report}}, date = {2022-08-29}, organization = {Cyfirma}, url = {https://www.cyfirma.com/outofband/cosmicduke-malware-analysis/}, language = {English}, urldate = {2022-09-20} } CosmicDuke Malware Analysis Report
CosmicDuke
2014-07-03F-SecureF-Secure Labs
@techreport{labs:20140703:cosmicduke:dbbee08, author = {F-Secure Labs}, title = {{COSMICDUKE: Cosmu with a twist of MiniDuke}}, date = {2014-07-03}, institution = {F-Secure}, url = {https://blog.f-secure.com/wp-content/uploads/2019/10/CosmicDuke.pdf}, language = {English}, urldate = {2022-09-20} } COSMICDUKE: Cosmu with a twist of MiniDuke
CosmicDuke
Yara Rules
[TLP:WHITE] win_cosmicduke_auto (20230715 | Detects win.cosmicduke.)
rule win_cosmicduke_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2023-07-11"
        version = "1"
        description = "Detects win.cosmicduke."
        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.cosmicduke"
        malpedia_rule_date = "20230705"
        malpedia_hash = "42d0574f4405bd7d2b154d321d345acb18834a41"
        malpedia_version = "20230715"
        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 = { 53 8b1d???????? 56 57 ff750c 8d442414 50 }
            // n = 7, score = 100
            //   53                   | push                ebx
            //   8b1d????????         |                     
            //   56                   | push                esi
            //   57                   | push                edi
            //   ff750c               | push                dword ptr [ebp + 0xc]
            //   8d442414             | lea                 eax, [esp + 0x14]
            //   50                   | push                eax

        $sequence_1 = { 895c2444 895c243c 895c2414 3bcb 0f8e92040000 8d5005 89542458 }
            // n = 7, score = 100
            //   895c2444             | mov                 dword ptr [esp + 0x44], ebx
            //   895c243c             | mov                 dword ptr [esp + 0x3c], ebx
            //   895c2414             | mov                 dword ptr [esp + 0x14], ebx
            //   3bcb                 | cmp                 ecx, ebx
            //   0f8e92040000         | jle                 0x498
            //   8d5005               | lea                 edx, [eax + 5]
            //   89542458             | mov                 dword ptr [esp + 0x58], edx

        $sequence_2 = { 6a00 bf00100000 57 6a00 ffd6 a3???????? 85c0 }
            // n = 7, score = 100
            //   6a00                 | push                0
            //   bf00100000           | mov                 edi, 0x1000
            //   57                   | push                edi
            //   6a00                 | push                0
            //   ffd6                 | call                esi
            //   a3????????           |                     
            //   85c0                 | test                eax, eax

        $sequence_3 = { 81ec14040000 8d45fc 50 8d85ecfbffff 50 c745fc04010000 ff15???????? }
            // n = 7, score = 100
            //   81ec14040000         | sub                 esp, 0x414
            //   8d45fc               | lea                 eax, [ebp - 4]
            //   50                   | push                eax
            //   8d85ecfbffff         | lea                 eax, [ebp - 0x414]
            //   50                   | push                eax
            //   c745fc04010000       | mov                 dword ptr [ebp - 4], 0x104
            //   ff15????????         |                     

        $sequence_4 = { ff15???????? 8bf0 eb02 33f6 85f6 7408 57 }
            // n = 7, score = 100
            //   ff15????????         |                     
            //   8bf0                 | mov                 esi, eax
            //   eb02                 | jmp                 4
            //   33f6                 | xor                 esi, esi
            //   85f6                 | test                esi, esi
            //   7408                 | je                  0xa
            //   57                   | push                edi

        $sequence_5 = { 757d c6861c58000001 ffb614580000 e8???????? 8b5f24 81fb00004006 773d }
            // n = 7, score = 100
            //   757d                 | jne                 0x7f
            //   c6861c58000001       | mov                 byte ptr [esi + 0x581c], 1
            //   ffb614580000         | push                dword ptr [esi + 0x5814]
            //   e8????????           |                     
            //   8b5f24               | mov                 ebx, dword ptr [edi + 0x24]
            //   81fb00004006         | cmp                 ebx, 0x6400000
            //   773d                 | ja                  0x3f

        $sequence_6 = { e8???????? ba01000080 8bc8 e8???????? 68???????? e8???????? b001 }
            // n = 7, score = 100
            //   e8????????           |                     
            //   ba01000080           | mov                 edx, 0x80000001
            //   8bc8                 | mov                 ecx, eax
            //   e8????????           |                     
            //   68????????           |                     
            //   e8????????           |                     
            //   b001                 | mov                 al, 1

        $sequence_7 = { 85c0 743d 68???????? 8d85a8fdffff 50 ff15???????? 85c0 }
            // n = 7, score = 100
            //   85c0                 | test                eax, eax
            //   743d                 | je                  0x3f
            //   68????????           |                     
            //   8d85a8fdffff         | lea                 eax, [ebp - 0x258]
            //   50                   | push                eax
            //   ff15????????         |                     
            //   85c0                 | test                eax, eax

        $sequence_8 = { 55 8bec 81ec28020000 8365f800 56 8d85dcfdffff 50 }
            // n = 7, score = 100
            //   55                   | push                ebp
            //   8bec                 | mov                 ebp, esp
            //   81ec28020000         | sub                 esp, 0x228
            //   8365f800             | and                 dword ptr [ebp - 8], 0
            //   56                   | push                esi
            //   8d85dcfdffff         | lea                 eax, [ebp - 0x224]
            //   50                   | push                eax

        $sequence_9 = { 50 6811820fff ff742440 ff742440 e8???????? 838c24b4040000ff 8d742428 }
            // n = 7, score = 100
            //   50                   | push                eax
            //   6811820fff           | push                0xff0f8211
            //   ff742440             | push                dword ptr [esp + 0x40]
            //   ff742440             | push                dword ptr [esp + 0x40]
            //   e8????????           |                     
            //   838c24b4040000ff     | or                  dword ptr [esp + 0x4b4], 0xffffffff
            //   8d742428             | lea                 esi, [esp + 0x28]

    condition:
        7 of them and filesize < 456704
}
[TLP:WHITE] win_cosmicduke_w0   (20230118 | detect cosmicduke)
rule win_cosmicduke_w0 {
	meta:
	    description = "detect cosmicduke"
	    author = "@malgamy12"
        date = "2022-11-6"
	    license = "DRL 1.1"
	    hash_sample1 = "93054d3abc36019ccfe88f87363363e6ca9b77f4"
        hash_sample2 = "0eadbd6ef9f5930257530ac5a3b8abb49c9755d1"
        hash_sample3 = "69c2d292179dc615bfe4d7f880b5f9928604558e"
        hash_sample4 = "616306489de4029da7271eadbdf090cee22ae1af"
        hash_sample5 = "ecb8edfddd812a125b515dc42a2e93569c1caed9"
        hash_sample6 = "a86f3faf1eedb7325023616adf37a62c9129c24e"
        hash_sample7 = "4d22b2d85b75ccf651f0ba85808482660a440bff"
        hash_sample8 = "3463df6b33b26c1249207f6e004c0bbc31b31152"
        hash_sample9 = "ca4c53eb86d5b920b321de573e212e31405707d5"
        hash_sample10 = "a48e4dd017618ae2d46a753345594a5f57fbe869"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.cosmicduke"
        malpedia_rule_date = "20230118"
        malpedia_hash = ""
        malpedia_version = "20230118"
        malpedia_license = "DRL 1.1"
        malpedia_sharing = "TLP:WHITE"
    strings:
        $pdb = "5\\bin\\bot.pdb" ascii

        $s1 = "pipe\\40DC244D-F62E-093E-8A91-736FF2FA2AA2" wide
        $s2 = "LoginName" ascii	
        $s3 = "select id, hostname, usernamefield, passwordfield, encryptedusern" wide
        $s4 = "*temporary;*Cookies;*games;*system32;*program files;*\\windows\\;*\\System Volume Information" wide
        $s5 = "msicheck.cmd" ascii
        $s6 = "AppData\\Roaming\\Miranda"  wide 
        $s7 = "Local Settings\\Application Data" wide
	
	/*
	imul    ebx, esi
        imul    esi, 0BC8Fh
        mov     eax, edx
        and     eax, 3
        lea     eax, [ebp+eax*4+var_3C]
        xor     [eax], ebx
        inc     edx
        dec     [ebp+var_8]
	*/

        $chunk_1 = {0F AF DE 69 F6 ?? ?? ?? ?? 8B C2 83 E0 ?? 8D 44 85 ?? 31 18 42 FF 4D ??}   

    condition:
        uint16(0) == 0x5A4D and filesize > 70KB and ($pdb  or  (4 of ($s*) and $chunk_1 ))
}
Download all Yara Rules