HDMR is a ransomware which encrypts user files and adds a .DMR64 extension. It also drops a ransom note named: "!!! READ THIS !!!.hta".
rule win_hdmr_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2026-09-17" version = "1" description = "Detects win.hdmr." 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.hdmr" malpedia_rule_date = "20260916" malpedia_hash = "53a643781c18e08f4a50949af60172d837a0b6f6" malpedia_version = "20260917" 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 = { 89842460140000 53 56 57 68ff030000 8d44246d 6a00 } // n = 7, score = 100 // 89842460140000 | mov dword ptr [esp + 0x1460], eax // 53 | push ebx // 56 | push esi // 57 | push edi // 68ff030000 | push 0x3ff // 8d44246d | lea eax, [esp + 0x6d] // 6a00 | push 0 $sequence_1 = { 8b8c246c140000 5f 5e 5b } // n = 4, score = 100 // 8b8c246c140000 | mov ecx, dword ptr [esp + 0x146c] // 5f | pop edi // 5e | pop esi // 5b | pop ebx $sequence_2 = { 8bf7 83e61f 8bc7 c1f805 c1e606 03348540d04100 8b45f8 } // n = 7, score = 100 // 8bf7 | mov esi, edi // 83e61f | and esi, 0x1f // 8bc7 | mov eax, edi // c1f805 | sar eax, 5 // c1e606 | shl esi, 6 // 03348540d04100 | add esi, dword ptr [eax*4 + 0x41d040] // 8b45f8 | mov eax, dword ptr [ebp - 8] $sequence_3 = { 8b442428 83c40c b920000000 8d742450 8dbc24d0000000 f3a5 8b4c2418 } // n = 7, score = 100 // 8b442428 | mov eax, dword ptr [esp + 0x28] // 83c40c | add esp, 0xc // b920000000 | mov ecx, 0x20 // 8d742450 | lea esi, [esp + 0x50] // 8dbc24d0000000 | lea edi, [esp + 0xd0] // f3a5 | rep movsd dword ptr es:[edi], dword ptr [esi] // 8b4c2418 | mov ecx, dword ptr [esp + 0x18] $sequence_4 = { 8d8c246c020000 51 ff15???????? 89442414 83f8ff 0f8445020000 } // n = 6, score = 100 // 8d8c246c020000 | lea ecx, [esp + 0x26c] // 51 | push ecx // ff15???????? | // 89442414 | mov dword ptr [esp + 0x14], eax // 83f8ff | cmp eax, -1 // 0f8445020000 | je 0x24b $sequence_5 = { 7514 c1e902 83e203 83f908 7229 f3a5 ff2495b0a94000 } // n = 7, score = 100 // 7514 | jne 0x16 // c1e902 | shr ecx, 2 // 83e203 | and edx, 3 // 83f908 | cmp ecx, 8 // 7229 | jb 0x2b // f3a5 | rep movsd dword ptr es:[edi], dword ptr [esi] // ff2495b0a94000 | jmp dword ptr [edx*4 + 0x40a9b0] $sequence_6 = { 53 ff15???????? 85c0 0f8496000000 39742428 } // n = 5, score = 100 // 53 | push ebx // ff15???????? | // 85c0 | test eax, eax // 0f8496000000 | je 0x9c // 39742428 | cmp dword ptr [esp + 0x28], esi $sequence_7 = { 8b4508 8945e8 8b450c 33c9 c745e444324100 8945ec } // n = 6, score = 100 // 8b4508 | mov eax, dword ptr [ebp + 8] // 8945e8 | mov dword ptr [ebp - 0x18], eax // 8b450c | mov eax, dword ptr [ebp + 0xc] // 33c9 | xor ecx, ecx // c745e444324100 | mov dword ptr [ebp - 0x1c], 0x413244 // 8945ec | mov dword ptr [ebp - 0x14], eax $sequence_8 = { 8bcb d3c0 85db 0f8492010000 8b8d70ffffff 0fb709 } // n = 6, score = 100 // 8bcb | mov ecx, ebx // d3c0 | rol eax, cl // 85db | test ebx, ebx // 0f8492010000 | je 0x198 // 8b8d70ffffff | mov ecx, dword ptr [ebp - 0x90] // 0fb709 | movzx ecx, word ptr [ecx] $sequence_9 = { 833d????????00 75f0 6860ea0000 ffd7 5f 5b 8b4dfc } // n = 7, score = 100 // 833d????????00 | // 75f0 | jne 0xfffffff2 // 6860ea0000 | push 0xea60 // ffd7 | call edi // 5f | pop edi // 5b | pop ebx // 8b4dfc | mov ecx, dword ptr [ebp - 4] condition: 7 of them and filesize < 284672 }
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