ESX and NAS modules for Babuk ransomware.
rule elf_babuk_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-07-11" version = "1" description = "Detects elf.babuk." 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/elf.babuk" 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 = { 8b8c246c010000 01e9 898c24d4030000 8bac2440010000 01cd 89ac24d0030000 8b8c2418010000 } // n = 7, score = 200 // 8b8c246c010000 | mov ecx, dword ptr [esp + 0x16c] // 01e9 | add ecx, ebp // 898c24d4030000 | mov dword ptr [esp + 0x3d4], ecx // 8bac2440010000 | mov ebp, dword ptr [esp + 0x140] // 01cd | add ebp, ecx // 89ac24d0030000 | mov dword ptr [esp + 0x3d0], ebp // 8b8c2418010000 | mov ecx, dword ptr [esp + 0x118] $sequence_1 = { e8???????? 8b4818 8b89c8000000 c70100000000 8b4818 8401 81c1c4000000 } // n = 7, score = 200 // e8???????? | // 8b4818 | mov ecx, dword ptr [eax + 0x18] // 8b89c8000000 | mov ecx, dword ptr [ecx + 0xc8] // c70100000000 | mov dword ptr [ecx], 0 // 8b4818 | mov ecx, dword ptr [eax + 0x18] // 8401 | test byte ptr [ecx], al // 81c1c4000000 | add ecx, 0xc4 $sequence_2 = { 90 ff8194000000 8b4818 8b4970 85c9 0f8431020000 8b0d???????? } // n = 7, score = 200 // 90 | nop // ff8194000000 | inc dword ptr [ecx + 0x94] // 8b4818 | mov ecx, dword ptr [eax + 0x18] // 8b4970 | mov ecx, dword ptr [ecx + 0x70] // 85c9 | test ecx, ecx // 0f8431020000 | je 0x237 // 8b0d???????? | $sequence_3 = { 0f857d010000 8d7c2424 31c0 e8???????? 8b8c2488000000 8b11 89d3 } // n = 7, score = 200 // 0f857d010000 | jne 0x183 // 8d7c2424 | lea edi, [esp + 0x24] // 31c0 | xor eax, eax // e8???????? | // 8b8c2488000000 | mov ecx, dword ptr [esp + 0x88] // 8b11 | mov edx, dword ptr [ecx] // 89d3 | mov ebx, edx $sequence_4 = { c744240800000000 c744240c22000000 c7442410ffffffff c744241400000000 e8???????? 8b44241c 8b4c2418 } // n = 7, score = 200 // c744240800000000 | mov dword ptr [esp + 8], 0 // c744240c22000000 | mov dword ptr [esp + 0xc], 0x22 // c7442410ffffffff | mov dword ptr [esp + 0x10], 0xffffffff // c744241400000000 | mov dword ptr [esp + 0x14], 0 // e8???????? | // 8b44241c | mov eax, dword ptr [esp + 0x1c] // 8b4c2418 | mov ecx, dword ptr [esp + 0x18] $sequence_5 = { 85c0 750c 8b442428 8988c8000000 ebd4 8b542428 8dbac8000000 } // n = 7, score = 200 // 85c0 | test eax, eax // 750c | jne 0xe // 8b442428 | mov eax, dword ptr [esp + 0x28] // 8988c8000000 | mov dword ptr [eax + 0xc8], ecx // ebd4 | jmp 0xffffffd6 // 8b542428 | mov edx, dword ptr [esp + 0x28] // 8dbac8000000 | lea edi, [edx + 0xc8] $sequence_6 = { 8b89fcffffff 3b6108 0f86e3000000 83ec24 8b442428 8b881c030000 894c2414 } // n = 7, score = 200 // 8b89fcffffff | mov ecx, dword ptr [ecx - 4] // 3b6108 | cmp esp, dword ptr [ecx + 8] // 0f86e3000000 | jbe 0xe9 // 83ec24 | sub esp, 0x24 // 8b442428 | mov eax, dword ptr [esp + 0x28] // 8b881c030000 | mov ecx, dword ptr [eax + 0x31c] // 894c2414 | mov dword ptr [esp + 0x14], ecx $sequence_7 = { 8b542444 f7e2 89942448020000 8944243c 8b442434 8b542438 f7e2 } // n = 7, score = 200 // 8b542444 | mov edx, dword ptr [esp + 0x44] // f7e2 | mul edx // 89942448020000 | mov dword ptr [esp + 0x248], edx // 8944243c | mov dword ptr [esp + 0x3c], eax // 8b442434 | mov eax, dword ptr [esp + 0x34] // 8b542438 | mov edx, dword ptr [esp + 0x38] // f7e2 | mul edx $sequence_8 = { c3 0fb6987c010000 84db 7589 890c24 e8???????? 83c428 } // n = 7, score = 200 // c3 | ret // 0fb6987c010000 | movzx ebx, byte ptr [eax + 0x17c] // 84db | test bl, bl // 7589 | jne 0xffffff8b // 890c24 | mov dword ptr [esp], ecx // e8???????? | // 83c428 | add esp, 0x28 $sequence_9 = { 8bbc24b8030000 01fe 11d1 8b942494020000 0fafd5 8d3cd2 } // n = 6, score = 200 // 8bbc24b8030000 | mov edi, dword ptr [esp + 0x3b8] // 01fe | add esi, edi // 11d1 | adc ecx, edx // 8b942494020000 | mov edx, dword ptr [esp + 0x294] // 0fafd5 | imul edx, ebp // 8d3cd2 | lea edi, [edx + edx*8] condition: 7 of them and filesize < 4186112 }
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