Actor(s): Turla Group
There is no description at this point.
rule win_cobra_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2020-12-22" version = "1" description = "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.cobra" malpedia_rule_date = "20201222" malpedia_hash = "30354d830a29f0fbd3714d93d94dea941d77a130" malpedia_version = "20201023" 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 = { 7511 e8???????? 85c0 7508 ff15???????? } // n = 5, score = 2900 // 7511 | jne 0x13 // e8???????? | // 85c0 | test eax, eax // 7508 | jne 0xa // ff15???????? | $sequence_1 = { 5b c3 85ff 7418 } // n = 4, score = 2500 // 5b | pop ebx // c3 | ret // 85ff | test edi, edi // 7418 | je 0x1a $sequence_2 = { 753c b980000000 e8???????? 85c0 a3???????? 7504 } // n = 6, score = 2500 // 753c | jne 0x3e // b980000000 | mov ecx, 0x80 // e8???????? | // 85c0 | test eax, eax // a3???????? | // 7504 | jne 6 $sequence_3 = { 5e 5b c3 85db 7405 83fb03 } // n = 6, score = 2500 // 5e | pop esi // 5b | pop ebx // c3 | ret // 85db | test ebx, ebx // 7405 | je 7 // 83fb03 | cmp ebx, 3 $sequence_4 = { 5b c3 83fb01 7405 83fb02 } // n = 5, score = 2500 // 5b | pop ebx // c3 | ret // 83fb01 | cmp ebx, 1 // 7405 | je 7 // 83fb02 | cmp ebx, 2 $sequence_5 = { 83f801 75f1 b900010000 e8???????? } // n = 4, score = 2500 // 83f801 | cmp eax, 1 // 75f1 | jne 0xfffffff3 // b900010000 | mov ecx, 0x100 // e8???????? | $sequence_6 = { e8???????? 8bf8 83fb01 751d 85ff 755d } // n = 6, score = 2500 // e8???????? | // 8bf8 | mov edi, eax // 83fb01 | cmp ebx, 1 // 751d | jne 0x1f // 85ff | test edi, edi // 755d | jne 0x5f $sequence_7 = { 85db 7514 391d???????? 754d 33c0 } // n = 5, score = 2500 // 85db | test ebx, ebx // 7514 | jne 0x16 // 391d???????? | // 754d | jne 0x4f // 33c0 | xor eax, eax $sequence_8 = { 85c0 a3???????? 7504 33c0 eb68 832000 } // n = 6, score = 2500 // 85c0 | test eax, eax // a3???????? | // 7504 | jne 6 // 33c0 | xor eax, eax // eb68 | jmp 0x6a // 832000 | and dword ptr [eax], 0 $sequence_9 = { e8???????? 85c0 750e 33ff 8bc7 } // n = 5, score = 2500 // e8???????? | // 85c0 | test eax, eax // 750e | jne 0x10 // 33ff | xor edi, edi // 8bc7 | mov eax, edi $sequence_10 = { 85c0 750e 3905???????? 7e2c ff0d???????? } // n = 5, score = 2500 // 85c0 | test eax, eax // 750e | jne 0x10 // 3905???????? | // 7e2c | jle 0x2e // ff0d???????? | $sequence_11 = { 757f 8b05???????? 85c0 0f8e8c000000 83e801 8905???????? } // n = 6, score = 2500 // 757f | jne 0x81 // 8b05???????? | // 85c0 | test eax, eax // 0f8e8c000000 | jle 0x92 // 83e801 | sub eax, 1 // 8905???????? | $sequence_12 = { ff25???????? 53 56 57 8bd9 33f6 53 } // n = 7, score = 2500 // ff25???????? | // 53 | push ebx // 56 | push esi // 57 | push edi // 8bd9 | mov ebx, ecx // 33f6 | xor esi, esi // 53 | push ebx $sequence_13 = { 807dff0a 7436 ff4df8 6a02 53 ff75f8 57 } // n = 7, score = 1900 // 807dff0a | cmp byte ptr [ebp - 1], 0xa // 7436 | je 0x38 // ff4df8 | dec dword ptr [ebp - 8] // 6a02 | push 2 // 53 | push ebx // ff75f8 | push dword ptr [ebp - 8] // 57 | push edi $sequence_14 = { 8945f8 8b450c 8945f4 8d45f0 50 ff7508 } // n = 6, score = 1900 // 8945f8 | mov dword ptr [ebp - 8], eax // 8b450c | mov eax, dword ptr [ebp + 0xc] // 8945f4 | mov dword ptr [ebp - 0xc], eax // 8d45f0 | lea eax, [ebp - 0x10] // 50 | push eax // ff7508 | push dword ptr [ebp + 8] $sequence_15 = { 8bfb 8a1401 3217 47 8810 } // n = 5, score = 1900 // 8bfb | mov edi, ebx // 8a1401 | mov dl, byte ptr [ecx + eax] // 3217 | xor dl, byte ptr [edi] // 47 | inc edi // 8810 | mov byte ptr [eax], dl $sequence_16 = { 8bec 83ec20 56 8b7508 ff750c } // n = 5, score = 1900 // 8bec | mov ebp, esp // 83ec20 | sub esp, 0x20 // 56 | push esi // 8b7508 | mov esi, dword ptr [ebp + 8] // ff750c | push dword ptr [ebp + 0xc] $sequence_17 = { eb11 8b03 85c0 7e0b 213b } // n = 5, score = 1200 // eb11 | jmp 0x13 // 8b03 | mov eax, dword ptr [ebx] // 85c0 | test eax, eax // 7e0b | jle 0xd // 213b | and dword ptr [ebx], edi $sequence_18 = { 5e 5d c3 8bc5 ebe4 } // n = 5, score = 1200 // 5e | pop esi // 5d | pop ebp // c3 | ret // 8bc5 | mov eax, ebp // ebe4 | jmp 0xffffffe6 $sequence_19 = { b801000000 f00fc105???????? 83c001 83f801 } // n = 4, score = 1200 // b801000000 | mov eax, 1 // f00fc105???????? | // 83c001 | add eax, 1 // 83f801 | cmp eax, 1 $sequence_20 = { 85ff 7406 83430401 eb04 } // n = 4, score = 1200 // 85ff | test edi, edi // 7406 | je 8 // 83430401 | add dword ptr [ebx + 4], 1 // eb04 | jmp 6 $sequence_21 = { 8d7701 ff15???????? 8b4304 217b08 } // n = 4, score = 1200 // 8d7701 | lea esi, [edi + 1] // ff15???????? | // 8b4304 | mov eax, dword ptr [ebx + 4] // 217b08 | and dword ptr [ebx + 8], edi $sequence_22 = { 894c2450 740f 034810 894c2450 } // n = 4, score = 1200 // 894c2450 | mov dword ptr [esp + 0x50], ecx // 740f | je 0x11 // 034810 | add ecx, dword ptr [eax + 0x10] // 894c2450 | mov dword ptr [esp + 0x50], ecx $sequence_23 = { 85c0 7f07 e8???????? eb26 } // n = 4, score = 1200 // 85c0 | test eax, eax // 7f07 | jg 9 // e8???????? | // eb26 | jmp 0x28 $sequence_24 = { e8???????? eb6d e8???????? 85c0 7564 } // n = 5, score = 1200 // e8???????? | // eb6d | jmp 0x6f // e8???????? | // 85c0 | test eax, eax // 7564 | jne 0x66 $sequence_25 = { 83781400 750a b865005921 e9???????? } // n = 4, score = 900 // 83781400 | pop esi // 750a | pop ebx // b865005921 | ret // e9???????? | $sequence_26 = { ff15???????? 83f87a 740b 3d230000c0 } // n = 4, score = 800 // ff15???????? | // 83f87a | cmp eax, 0x7a // 740b | je 0xd // 3d230000c0 | cmp eax, 0xc0000023 $sequence_27 = { 51 e8???????? 33c0 83c43c } // n = 4, score = 800 // 51 | push ecx // e8???????? | // 33c0 | xor eax, eax // 83c43c | add esp, 0x3c $sequence_28 = { 6689440ffc 6685c0 75ee f685c003000010 } // n = 4, score = 800 // 6689440ffc | mov word ptr [edi + ecx - 4], ax // 6685c0 | test ax, ax // 75ee | jne 0xfffffff0 // f685c003000010 | test byte ptr [ebp + 0x3c0], 0x10 $sequence_29 = { 68???????? 51 ffd6 83c40c 6a28 } // n = 5, score = 800 // 68???????? | // 51 | push ecx // ffd6 | call esi // 83c40c | add esp, 0xc // 6a28 | push 0x28 $sequence_30 = { 53 56 33db 57 6808020000 } // n = 5, score = 800 // 53 | push ebx // 56 | push esi // 33db | xor ebx, ebx // 57 | push edi // 6808020000 | push 0x208 $sequence_31 = { 663bcb 75f4 8b0d???????? 8b15???????? 8908 8b0d???????? } // n = 6, score = 800 // 663bcb | cmp cx, bx // 75f4 | jne 0xfffffff6 // 8b0d???????? | // 8b15???????? | // 8908 | mov dword ptr [eax], ecx // 8b0d???????? | $sequence_32 = { 51 6a00 6a00 56 ff15???????? 56 8bf8 } // n = 7, score = 800 // 51 | push ecx // 6a00 | push 0 // 6a00 | push 0 // 56 | push esi // ff15???????? | // 56 | push esi // 8bf8 | mov edi, eax $sequence_33 = { 5d c3 8b4d08 57 51 6a00 6a00 } // n = 7, score = 800 // 5d | pop ebp // c3 | ret // 8b4d08 | mov ecx, dword ptr [ebp + 8] // 57 | push edi // 51 | push ecx // 6a00 | push 0 // 6a00 | push 0 $sequence_34 = { 83c002 663bcb 75f4 8b15???????? 8b0d???????? 8910 } // n = 6, score = 800 // 83c002 | add eax, 2 // 663bcb | cmp cx, bx // 75f4 | jne 0xfffffff6 // 8b15???????? | // 8b0d???????? | // 8910 | mov dword ptr [eax], edx $sequence_35 = { 6a18 8d45e8 50 6a00 6aff e8???????? 85c0 } // n = 7, score = 800 // 6a18 | test ebx, ebx // 8d45e8 | je 7 // 50 | cmp ebx, 3 // 6a00 | pop ebx // 6aff | ret // e8???????? | // 85c0 | test ebx, ebx $sequence_36 = { 6a03 68000000c0 50 ff15???????? 8bf0 83feff 7505 } // n = 7, score = 800 // 6a03 | push 3 // 68000000c0 | push 0xc0000000 // 50 | push eax // ff15???????? | // 8bf0 | mov esi, eax // 83feff | cmp esi, -1 // 7505 | jne 7 $sequence_37 = { 488bf8 4883f8ff 741e 4c8d8dd4030000 4533c0 33d2 } // n = 6, score = 700 // 488bf8 | mov dword ptr [edi - 2], eax // 4883f8ff | test ax, ax // 741e | jne 0xffffffe9 // 4c8d8dd4030000 | xor eax, eax // 4533c0 | dec eax // 33d2 | or ecx, 0xffffffff $sequence_38 = { 4533c0 33d2 488bc8 ff15???????? 488bcf ff15???????? 41b701 } // n = 7, score = 700 // 4533c0 | dec eax // 33d2 | add esp, 0xd48 // 488bc8 | dec ecx // ff15???????? | // 488bcf | mov ecx, esp // ff15???????? | // 41b701 | dec eax $sequence_39 = { 7418 4584ff 7518 33c0 4881c4480d0000 } // n = 5, score = 700 // 7418 | dec ecx // 4584ff | mov ecx, ebp // 7518 | dec esp // 33c0 | mov ebp, dword ptr [esp + 0xd40] // 4881c4480d0000 | dec eax $sequence_40 = { 83f812 410f44c4 448be0 498bcd ff15???????? } // n = 5, score = 700 // 83f812 | cmp eax, 0x12 // 410f44c4 | inc ecx // 448be0 | cmove eax, esp // 498bcd | inc esp // ff15???????? | $sequence_41 = { 488b05???????? 498bcc 488947fe 8b05???????? } // n = 4, score = 700 // 488b05???????? | // 498bcc | mov edi, dword ptr [esp + 0xd88] // 488947fe | dec eax // 8b05???????? | $sequence_42 = { 6685c0 75e7 33c0 4883c9ff 488dbdb0010000 66f2af } // n = 6, score = 700 // 6685c0 | test ebx, ebx // 75e7 | je 0x1a // 33c0 | inc ebp // 4883c9ff | test bh, bh // 488dbdb0010000 | jne 0x1d // 66f2af | xor eax, eax $sequence_43 = { 7507 32c0 e9???????? c745b818000000 } // n = 4, score = 600 // 7507 | push -1 // 32c0 | test eax, eax // e9???????? | // c745b818000000 | je 9 $sequence_44 = { c3 668cc8 c3 53 50 } // n = 5, score = 200 // c3 | push 0 // 668cc8 | push -1 // c3 | test eax, eax // 53 | je 0xd // 50 | lea eax, [ebp - 0x18] $sequence_45 = { 85c0 740a b8050000c0 e9???????? } // n = 4, score = 200 // 85c0 | push eax // 740a | push 0 // b8050000c0 | push -1 // e9???????? | $sequence_46 = { 68???????? e8???????? 6880000000 6a00 68???????? e8???????? 83c40c } // n = 7, score = 100 // 68???????? | // e8???????? | // 6880000000 | push ecx // 6a00 | ret // 68???????? | // e8???????? | // 83c40c | mov ax, cs $sequence_47 = { 83ea24 8955d8 8b45d8 c7401c00000000 } // n = 4, score = 100 // 83ea24 | push eax // 8955d8 | xor esi, esi // 8b45d8 | add eax, edx // c7401c00000000 | adc ecx, esi condition: 7 of them and filesize < 1368064 }
rule win_cobra_w0 { meta: author = "ESET Research" source = "https://www.welivesecurity.com/2017/03/30/carbon-paper-peering-turlas-second-stage-backdoor/#_footnote_2" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.cobra" malpedia_version = "20170512" malpedia_sharing = "TLP:WHITE" malpedia_license = "" strings: $s1 = "ModStart" $s2 = "ModuleStart" $t1 = "STOP|OK" $t2 = "STOP|KILL" condition: (uint16(0) == 0x5a4d) and (1 of ($s*)) and (1 of ($t*)) }
import "pe" rule win_cobra_w1 { meta: author = "ESET Research" source = "https://www.welivesecurity.com/2017/03/30/carbon-paper-peering-turlas-second-stage-backdoor/#_footnote_2" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.cobra" malpedia_version = "20170512" malpedia_sharing = "TLP:WHITE" malpedia_license = "" condition: (pe.version_info["InternalName"] contains "SERVICE.EXE" or pe.version_info["InternalName"] contains "MSIMGHLP.DLL" or pe.version_info["InternalName"] contains "MSXIML.DLL") and pe.version_info["CompanyName"] contains "Microsoft Corporation" }
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