Actor(s): APT29
A stager used by APT29 to deploy CobaltStrike.
rule win_halfrig_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2026-05-04" version = "1" description = "Detects win.halfrig." 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.halfrig" malpedia_rule_date = "20260422" malpedia_hash = "a182e35da64e6d71cb55f125c4d4225196523f14" malpedia_version = "20260504" 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 = { 498bcf 8802 488d542420 e8???????? 488d0d64eb0700 e8???????? } // n = 6, score = 100 // 498bcf | dec eax // 8802 | lea edx, [esp + 0x20] // 488d542420 | dec eax // e8???????? | // 488d0d64eb0700 | lea ecx, [0x74740] // e8???????? | $sequence_1 = { 498bcf 8802 488d542420 e8???????? 488d0d40470700 e8???????? } // n = 6, score = 100 // 498bcf | mov byte ptr [edx], al // 8802 | dec eax // 488d542420 | lea edx, [esp + 0x20] // e8???????? | // 488d0d40470700 | dec eax // e8???????? | $sequence_2 = { 488d0d384f0700 e8???????? 40383d???????? 7435 488bd3 4c8bc7 43301438 } // n = 7, score = 100 // 488d0d384f0700 | mov edx, esi // e8???????? | // 40383d???????? | // 7435 | nop word ptr [eax + eax] // 488bd3 | dec eax // 4c8bc7 | lea ecx, [ecx + 0x80] // 43301438 | movups xmm0, xmmword ptr [eax] $sequence_3 = { 40883d???????? 4c893d???????? 488d8d30030000 488d05fcf70300 488bd6 } // n = 5, score = 100 // 40883d???????? | // 4c893d???????? | // 488d8d30030000 | dec eax // 488d05fcf70300 | lea ecx, [0x48db9] // 488bd6 | jne 0x1e7b $sequence_4 = { 4c898ee0000000 3905???????? 7e4a 488d0df0970400 e8???????? } // n = 5, score = 100 // 4c898ee0000000 | dec esp // 3905???????? | // 7e4a | mov eax, esi // 488d0df0970400 | dec esp // e8???????? | $sequence_5 = { 4833d0 4981f801040000 72d8 40883d???????? 4c893d???????? 488d8d30030000 488d05ec650300 } // n = 7, score = 100 // 4833d0 | lea edx, [esp + 0x20] // 4981f801040000 | dec eax // 72d8 | lea eax, [ebp + 0x330] // 40883d???????? | // 4c893d???????? | // 488d8d30030000 | dec eax // 488d05ec650300 | lea ecx, [0x46e30] $sequence_6 = { 0fb600 498bcf 8802 488d542420 e8???????? 488d0d48040600 e8???????? } // n = 7, score = 100 // 0fb600 | inc sp // 498bcf | movq mm2, mm7 // 8802 | inc esp // 488d542420 | movaps xmmword ptr [eax - 0x48], xmm1 // e8???????? | // 488d0d48040600 | inc sp // e8???????? | $sequence_7 = { 8801 418b06 3905???????? 0f8ea3000000 488d0dcf4f0700 e8???????? 833d????????ff } // n = 7, score = 100 // 8801 | mov eax, dword ptr [esi] // 418b06 | jle 0xae3 // 3905???????? | // 0f8ea3000000 | dec eax // 488d0dcf4f0700 | lea ecx, [0x752cf] // e8???????? | // 833d????????ff | $sequence_8 = { 8801 418b06 3905???????? 0f8ea3000000 488d0defba0700 e8???????? 833d????????ff } // n = 7, score = 100 // 8801 | mov eax, dword ptr [esi] // 418b06 | jle 0xc4b // 3905???????? | // 0f8ea3000000 | dec eax // 488d0defba0700 | lea ecx, [0x761e3] // e8???????? | // 833d????????ff | $sequence_9 = { 40883d???????? 4c893d???????? 488d8d30030000 488d052cfb0400 488bd6 660f1f840000000000 488d8980000000 } // n = 7, score = 100 // 40883d???????? | // 4c893d???????? | // 488d8d30030000 | sub esp, 0x600 // 488d052cfb0400 | dec esp // 488bd6 | mov esi, ecx // 660f1f840000000000 | dec eax // 488d8980000000 | mov dword ptr [esp + 0x20], ebp condition: 7 of them and filesize < 1369088 }
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