Actor(s): APT29
There is no description at this point.
rule win_cosmicduke_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-01-25" 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 = "20230124" malpedia_hash = "2ee0eebba83dce3d019a90519f2f972c0fcf9686" malpedia_version = "20230125" 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 56 57 8d442444 50 ff15???????? } // n = 6, score = 100 // 53 | push ebx // 56 | push esi // 57 | push edi // 8d442444 | lea eax, [esp + 0x44] // 50 | push eax // ff15???????? | $sequence_1 = { 50 ffd7 53 8d84246c040000 50 ffd6 68???????? } // n = 7, score = 100 // 50 | push eax // ffd7 | call edi // 53 | push ebx // 8d84246c040000 | lea eax, [esp + 0x46c] // 50 | push eax // ffd6 | call esi // 68???????? | $sequence_2 = { e8???????? 3ac3 742a 53 ff15???????? ff742410 6a08 } // n = 7, score = 100 // e8???????? | // 3ac3 | cmp al, bl // 742a | je 0x2c // 53 | push ebx // ff15???????? | // ff742410 | push dword ptr [esp + 0x10] // 6a08 | push 8 $sequence_3 = { 50 6a04 58 b9???????? 8975e8 e8???????? 33f6 } // n = 7, score = 100 // 50 | push eax // 6a04 | push 4 // 58 | pop eax // b9???????? | // 8975e8 | mov dword ptr [ebp - 0x18], esi // e8???????? | // 33f6 | xor esi, esi $sequence_4 = { 8d95b0ebffff 8bce e8???????? 5f b001 5e c9 } // n = 7, score = 100 // 8d95b0ebffff | lea edx, [ebp - 0x1450] // 8bce | mov ecx, esi // e8???????? | // 5f | pop edi // b001 | mov al, 1 // 5e | pop esi // c9 | leave $sequence_5 = { 68???????? ff15???????? 8b16 8915???????? 8b7e04 893d???????? 8b06 } // n = 7, score = 100 // 68???????? | // ff15???????? | // 8b16 | mov edx, dword ptr [esi] // 8915???????? | // 8b7e04 | mov edi, dword ptr [esi + 4] // 893d???????? | // 8b06 | mov eax, dword ptr [esi] $sequence_6 = { 668b4710 668945e5 668b4716 bf???????? 57 668945e9 ff15???????? } // n = 7, score = 100 // 668b4710 | mov ax, word ptr [edi + 0x10] // 668945e5 | mov word ptr [ebp - 0x1b], ax // 668b4716 | mov ax, word ptr [edi + 0x16] // bf???????? | // 57 | push edi // 668945e9 | mov word ptr [ebp - 0x17], ax // ff15???????? | $sequence_7 = { 7cd6 0fb645ff 50 8d45d8 68???????? 50 ffd3 } // n = 7, score = 100 // 7cd6 | jl 0xffffffd8 // 0fb645ff | movzx eax, byte ptr [ebp - 1] // 50 | push eax // 8d45d8 | lea eax, [ebp - 0x28] // 68???????? | // 50 | push eax // ffd3 | call ebx $sequence_8 = { ff750c ff15???????? eb37 6a08 59 6a29 ff7508 } // n = 7, score = 100 // ff750c | push dword ptr [ebp + 0xc] // ff15???????? | // eb37 | jmp 0x39 // 6a08 | push 8 // 59 | pop ecx // 6a29 | push 0x29 // ff7508 | push dword ptr [ebp + 8] $sequence_9 = { 6a08 ff35???????? ff15???????? 3bc6 7499 8bf0 85f6 } // n = 7, score = 100 // 6a08 | push 8 // ff35???????? | // ff15???????? | // 3bc6 | cmp eax, esi // 7499 | je 0xffffff9b // 8bf0 | mov esi, eax // 85f6 | test esi, esi condition: 7 of them and filesize < 456704 }
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 )) }
If your designated proposal does not fit in any other category, feel free to write a free-text in the comment field below.
Please propose all changes regarding references on the Malpedia library page
Your suggestion will be reviewed before being published. Thank you for contributing!
YYYY-MM-DD
YYYY-MM
YYYY