Ransomware
rule win_blackmagic_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-12-06" version = "1" description = "Detects win.blackmagic." 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.blackmagic" 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 = { 488d15b40c0700 488bcd e8???????? 488b4620 488903 488b5c2430 488b6c2438 } // n = 7, score = 100 // 488d15b40c0700 | dec eax // 488bcd | test ebx, ebx // e8???????? | // 488b4620 | jne 0x854 // 488903 | dec eax // 488b5c2430 | mov eax, edi // 488b6c2438 | dec ecx $sequence_1 = { 4c8b01 ba01000000 41ff10 90 488bc7 488b4c2458 4833cc } // n = 7, score = 100 // 4c8b01 | mov dword ptr [esp + 0x90], eax // ba01000000 | dec ecx // 41ff10 | mov ebp, eax // 90 | dec eax // 488bc7 | mov edi, edx // 488b4c2458 | dec esp // 4833cc | mov esi, ecx $sequence_2 = { 4863d0 488d4dd0 488b94d3086c0700 e8???????? 488b0d???????? 0fbe01 } // n = 6, score = 100 // 4863d0 | mov eax, esi // 488d4dd0 | dec eax // 488b94d3086c0700 | mov edx, eax // e8???????? | // 488b0d???????? | // 0fbe01 | dec eax $sequence_3 = { 3bc3 740a 8b5c245c 85db 748d eb35 ff15???????? } // n = 7, score = 100 // 3bc3 | mov byte ptr [ecx], 0x5c // 740a | dec eax // 8b5c245c | inc ecx // 85db | dec ecx // 748d | neg esi // eb35 | jmp 0x51 // ff15???????? | $sequence_4 = { 48895e08 488b4718 4c894010 488b4718 49894018 4c894718 49897810 } // n = 7, score = 100 // 48895e08 | inc eax // 488b4718 | movzx esi, dh // 4c894010 | mov ecx, 1 // 488b4718 | mov dword ptr [ebp + 0x30], 0x258 // 49894018 | dec eax // 4c894718 | mov edx, dword ptr [ebp] // 49897810 | dec eax $sequence_5 = { 0f114160 0f104070 488b8090000000 0f114170 0f118980000000 48898190000000 488d0587eaffff } // n = 7, score = 100 // 0f114160 | dec eax // 0f104070 | mov dword ptr [esp + 0x200], eax // 488b8090000000 | dec eax // 0f114170 | lea ecx, [esp + 0x318] // 0f118980000000 | dec eax // 48898190000000 | cmp dword ptr [esp + 0x330], 0x10 // 488d0587eaffff | dec eax $sequence_6 = { 0f867d030000 458d7302 448d7d02 8bc5 4c8d1483 418b3a } // n = 6, score = 100 // 0f867d030000 | mov dword ptr [edi + 0xc], esi // 458d7302 | dec esp // 448d7d02 | mov dword ptr [edi + 0x10], esi // 8bc5 | dec esp // 4c8d1483 | mov dword ptr [edi + 0x18], esi // 418b3a | add ebx, 4 $sequence_7 = { 41f782b800000000080000 7427 498b8ad0000000 410fb6d3 e8???????? 440fb65c2430 0fbec8 } // n = 7, score = 100 // 41f782b800000000080000 | dec eax // 7427 | mov dword ptr [ebp - 0x38], 0 // 498b8ad0000000 | dec ebp // 410fb6d3 | mov eax, esi // e8???????? | // 440fb65c2430 | dec eax // 0fbec8 | mov edx, eax $sequence_8 = { 488bd0 e8???????? 488b5308 498bce 482b13 48c1fa02 e8???????? } // n = 7, score = 100 // 488bd0 | dec eax // e8???????? | // 488b5308 | mov dword ptr [esp + 0xb0], ebx // 498bce | call dword ptr [eax + 0x38] // 482b13 | cmp eax, -1 // 48c1fa02 | jne 0x12b // e8???????? | $sequence_9 = { 4881f900100000 7223 488d4127 483bc1 0f8681000000 488bc8 e8???????? } // n = 7, score = 100 // 4881f900100000 | sub esp, 0x20 // 7223 | dec eax // 488d4127 | lea ebx, [0x5c4c0] // 483bc1 | dec eax // 0f8681000000 | mov ecx, dword ptr [ebx] // 488bc8 | test cl, cl // e8???????? | condition: 7 of them and filesize < 1416192 }
If your designated proposal does not fit in any other category, feel free to write a free-text in the comment field below. Changes regarding references should be proposed on the Malpedia library page.
Your suggestion will be reviewed before being published. Thank you for contributing!
YYYY-MM-DD
YYYY-MM
YYYY