Actor(s): Leviathan
BADFLICK, a backdoor that is capable of modifying the file system, generating a reverse shell, and modifying its command-and-control configuration.
rule win_badflick_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-12-06" version = "1" description = "Detects win.badflick." 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.badflick" 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 = { 74e2 6800800000 53 ff75f8 ff75e4 ff15???????? } // n = 6, score = 100 // 74e2 | je 0xffffffe4 // 6800800000 | push 0x8000 // 53 | push ebx // ff75f8 | push dword ptr [ebp - 8] // ff75e4 | push dword ptr [ebp - 0x1c] // ff15???????? | $sequence_1 = { 56 ff75fc ff15???????? 53 ff15???????? 33c0 5f } // n = 7, score = 100 // 56 | push esi // ff75fc | push dword ptr [ebp - 4] // ff15???????? | // 53 | push ebx // ff15???????? | // 33c0 | xor eax, eax // 5f | pop edi $sequence_2 = { 8d4598 53 50 c7459044000000 895d94 e8???????? 33c0 } // n = 7, score = 100 // 8d4598 | lea eax, [ebp - 0x68] // 53 | push ebx // 50 | push eax // c7459044000000 | mov dword ptr [ebp - 0x70], 0x44 // 895d94 | mov dword ptr [ebp - 0x6c], ebx // e8???????? | // 33c0 | xor eax, eax $sequence_3 = { 8bec 51 51 8b4d0c 8b4101 53 56 } // n = 7, score = 100 // 8bec | mov ebp, esp // 51 | push ecx // 51 | push ecx // 8b4d0c | mov ecx, dword ptr [ebp + 0xc] // 8b4101 | mov eax, dword ptr [ecx + 1] // 53 | push ebx // 56 | push esi $sequence_4 = { 68???????? 50 ffd7 be???????? 56 } // n = 5, score = 100 // 68???????? | // 50 | push eax // ffd7 | call edi // be???????? | // 56 | push esi $sequence_5 = { 8945fc ffd6 8bf0 8d85e8fcffff 50 } // n = 5, score = 100 // 8945fc | mov dword ptr [ebp - 4], eax // ffd6 | call esi // 8bf0 | mov esi, eax // 8d85e8fcffff | lea eax, [ebp - 0x318] // 50 | push eax $sequence_6 = { 5d c3 b001 c3 55 8bec } // n = 6, score = 100 // 5d | pop ebp // c3 | ret // b001 | mov al, 1 // c3 | ret // 55 | push ebp // 8bec | mov ebp, esp $sequence_7 = { 50 8b4704 03450c 50 8b47fc 0345f8 } // n = 6, score = 100 // 50 | push eax // 8b4704 | mov eax, dword ptr [edi + 4] // 03450c | add eax, dword ptr [ebp + 0xc] // 50 | push eax // 8b47fc | mov eax, dword ptr [edi - 4] // 0345f8 | add eax, dword ptr [ebp - 8] $sequence_8 = { 85c0 0f85e7000000 6a01 ff7305 } // n = 4, score = 100 // 85c0 | test eax, eax // 0f85e7000000 | jne 0xed // 6a01 | push 1 // ff7305 | push dword ptr [ebx + 5] $sequence_9 = { ff750c e8???????? 50 e8???????? 59 59 56 } // n = 7, score = 100 // ff750c | push dword ptr [ebp + 0xc] // e8???????? | // 50 | push eax // e8???????? | // 59 | pop ecx // 59 | pop ecx // 56 | push esi condition: 7 of them and filesize < 81920 }
rule win_badflick_w0 { meta: description = "Detects BADFLICK backdoor" author = "@VK_Intel" reference = "BADFLICK backdoor" date = "2018-03-26" hash = "7ba05abdf8f0323aa30c3d52e22df951eb5b67a2620014336eab7907b0a5cedf" reference = "https://www.fireeye.com/blog/threat-research/2018/03/suspected-chinese-espionage-group-targeting-maritime-and-engineering-industries.html" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.badflick" malpedia_version = "20180407" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $s0 = "%s\\en-US\\cmd.exe.mui" fullword wide $s1 = "[Green] pid=%d tid=%d modulePath=%s|" fullword wide $s2 = "1|103.243.175.181|80|5|xxxxxxxxxxxxxxxxxxxxxxx" wide ascii $s3 = "modulePath=%[^|]" fullword wide $s4 = "%s:%d:%s:%d:%d" fullword ascii $s5 = "regsvr32 %s %s %s go \"%s\"" fullword wide $s6 = "modulePath=" fullword wide $s7 = "%d %d.%d.%d %s" fullword wide $s8 = "winMain static green" fullword wide $s9 = "o%d Core %.2f GHz" fullword wide $s10 = "6&62676=6B6G6N6c6s6" fullword ascii $op0 = { 8b 54 24 54 8b cf 2b cb 8d 04 0a 3b c7 76 02 8b } $op1 = { a1 08 77 40 00 89 45 94 8d 45 94 50 ff 35 04 77 } $op2 = { 8b 7c 24 14 8b f7 2b f5 8d 64 24 00 8a 1f 84 db } condition: uint16(0) == 0x5a4d and filesize < 108KB and 8 of ($s*) and 1 of ($op*) }
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