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-03-28" 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 = "20230328" malpedia_hash = "9d2d75cef573c1c2d861f5197df8f563b05a305d" malpedia_version = "20230407" 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 = { 8d4609 ff75f8 50 e8???????? 57 } // n = 5, score = 100 // 8d4609 | lea eax, [esi + 9] // ff75f8 | push dword ptr [ebp - 8] // 50 | push eax // e8???????? | // 57 | push edi $sequence_1 = { 8d4dfc 51 50 8b4704 03450c } // n = 5, score = 100 // 8d4dfc | lea ecx, [ebp - 4] // 51 | push ecx // 50 | push eax // 8b4704 | mov eax, dword ptr [edi + 4] // 03450c | add eax, dword ptr [ebp + 0xc] $sequence_2 = { 740c 6a08 59 8d75d0 8bf8 f3a5 eb02 } // n = 7, score = 100 // 740c | je 0xe // 6a08 | push 8 // 59 | pop ecx // 8d75d0 | lea esi, [ebp - 0x30] // 8bf8 | mov edi, eax // f3a5 | rep movsd dword ptr es:[edi], dword ptr [esi] // eb02 | jmp 4 $sequence_3 = { ff7510 53 eb18 83f8ff 741c 03f8 } // n = 6, score = 100 // ff7510 | push dword ptr [ebp + 0x10] // 53 | push ebx // eb18 | jmp 0x1a // 83f8ff | cmp eax, -1 // 741c | je 0x1e // 03f8 | add edi, eax $sequence_4 = { 85c0 7521 ff15???????? 3dea000000 } // n = 4, score = 100 // 85c0 | test eax, eax // 7521 | jne 0x23 // ff15???????? | // 3dea000000 | cmp eax, 0xea $sequence_5 = { ff75b4 e8???????? 6a01 50 ff75fc } // n = 5, score = 100 // ff75b4 | push dword ptr [ebp - 0x4c] // e8???????? | // 6a01 | push 1 // 50 | push eax // ff75fc | push dword ptr [ebp - 4] $sequence_6 = { 897e09 8b3d???????? 50 ffd7 8b4609 ff7510 8d44460d } // n = 7, score = 100 // 897e09 | mov dword ptr [esi + 9], edi // 8b3d???????? | // 50 | push eax // ffd7 | call edi // 8b4609 | mov eax, dword ptr [esi + 9] // ff7510 | push dword ptr [ebp + 0x10] // 8d44460d | lea eax, [esi + eax*2 + 0xd] $sequence_7 = { 50 6804000098 57 c745f001000000 c745f400f40100 c745f8e8030000 ff15???????? } // n = 7, score = 100 // 50 | push eax // 6804000098 | push 0x98000004 // 57 | push edi // c745f001000000 | mov dword ptr [ebp - 0x10], 1 // c745f400f40100 | mov dword ptr [ebp - 0xc], 0x1f400 // c745f8e8030000 | mov dword ptr [ebp - 8], 0x3e8 // ff15???????? | $sequence_8 = { 6a3d e8???????? 8bf0 8a4508 59 59 884605 } // n = 7, score = 100 // 6a3d | push 0x3d // e8???????? | // 8bf0 | mov esi, eax // 8a4508 | mov al, byte ptr [ebp + 8] // 59 | pop ecx // 59 | pop ecx // 884605 | mov byte ptr [esi + 5], al $sequence_9 = { 8d85a8fbffff 50 7408 e8???????? 59 } // n = 5, score = 100 // 8d85a8fbffff | lea eax, [ebp - 0x458] // 50 | push eax // 7408 | je 0xa // e8???????? | // 59 | pop ecx 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