C2 framework.
rule win_nighthawk_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2026-09-17" version = "1" description = "Detects win.nighthawk." 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.nighthawk" 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 = { 83780803 0f85a9070000 4889742460 48897c2478 48897c2470 448bc7 488d1538600500 } // n = 7, score = 100 // 83780803 | mov ecx, dword ptr [ecx + 0x100] // 0f85a9070000 | push edi // 4889742460 | dec eax // 48897c2478 | sub esp, 0x20 // 48897c2470 | dec eax // 448bc7 | mov edi, ecx // 488d1538600500 | xor ebx, ebx $sequence_1 = { bf02000000 488365b800 488365c800 488365d000 41b820000000 488bd3 488d4db8 } // n = 7, score = 100 // bf02000000 | dec ebp // 488365b800 | test esi, esi // 488365c800 | jne 0xfffffe64 // 488365d000 | mov ecx, dword ptr [esi + 0xe0] // 41b820000000 | jne 0x325 // 488bd3 | cmp word ptr [eax + 8], 0xb // 488d4db8 | jne 0x325 $sequence_2 = { e8???????? 90 488b4d6f ff15???????? bf04000000 8bc7 4c8d9c2490000000 } // n = 7, score = 100 // e8???????? | // 90 | inc ebp // 488b4d6f | test edi, edi // ff15???????? | // bf04000000 | je 0x50d // 8bc7 | mov eax, dword ptr [eax + ecx*4 + 0xb38d8] // 4c8d9c2490000000 | test eax, eax $sequence_3 = { 85c0 0f8495000000 4c8b5750 4c03d0 410fb652ff 413a12 0f8580000000 } // n = 7, score = 100 // 85c0 | mov ecx, esi // 0f8495000000 | mov edi, eax // 4c8b5750 | jb 0x5c // 4c03d0 | dec eax // 410fb652ff | mov ecx, dword ptr [esi] // 413a12 | dec ecx // 0f8580000000 | mov eax, dword ptr [esi] $sequence_4 = { 7405 e8???????? 48899fc0000000 48c787c800000007000000 66899fb0000000 488d0525fc0900 488907 } // n = 7, score = 100 // 7405 | dec esp // e8???????? | // 48899fc0000000 | mov dword ptr [ebp - 0x68], edi // 48c787c800000007000000 | inc ecx // 66899fb0000000 | mov eax, 0x12 // 488d0525fc0900 | dec eax // 488907 | lea edx, [0x72ea5] $sequence_5 = { 48c7c6fcffffff eb19 488d340a 493bf6 731d 498bf6 48c1e602 } // n = 7, score = 100 // 48c7c6fcffffff | mov edi, eax // eb19 | dec eax // 488d340a | lea edx, [ebx + 0x20] // 493bf6 | dec eax // 731d | lea ecx, [ebp + 0x17] // 498bf6 | dec eax // 48c1e602 | lea ecx, [ebx + 0x40] $sequence_6 = { 7406 e8???????? 90 498bd7 488d4d30 e8???????? e8???????? } // n = 7, score = 100 // 7406 | dec eax // e8???????? | // 90 | mov dword ptr [ebp + 0x148], edi // 498bd7 | inc esp // 488d4d30 | mov byte ptr [ebp + 0x130], ch // e8???????? | // e8???????? | $sequence_7 = { ff15???????? 8bd8 488b442470 498906 4c8d9c2430010000 8bc3 498b5b28 } // n = 7, score = 100 // ff15???????? | // 8bd8 | dec eax // 488b442470 | mov dword ptr [esp + 8], ebx // 498906 | dec ecx // 4c8d9c2430010000 | mov eax, eax // 8bc3 | dec ebp // 498b5b28 | mov ebx, eax $sequence_8 = { 7421 4183e4fb 4489a5f0000000 48837da010 720f 488b4d88 4885c9 } // n = 7, score = 100 // 7421 | dec ecx // 4183e4fb | sub ecx, esi // 4489a5f0000000 | dec eax // 48837da010 | sar ecx, 3 // 720f | dec ecx // 488b4d88 | imul ecx, ebp // 4885c9 | dec ecx $sequence_9 = { 4c8d4d50 41b804000000 48895c2420 488d5558 ff15???????? 85c0 74b8 } // n = 7, score = 100 // 4c8d4d50 | dec ecx // 41b804000000 | mov ecx, dword ptr [eax] // 48895c2420 | dec ecx // 488d5558 | and dword ptr [eax], 0 // ff15???????? | // 85c0 | dec ecx // 74b8 | mov eax, dword ptr [eax - 8] condition: 7 of them and filesize < 1949696 }
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