Actor(s): APT41
According to FireEye, GEARSHIFT is a memory-only dropper for two keylogger DLLs. It is designed to replace a legitimate Fax Service DLL.
rule win_gearshift_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-12-06" version = "1" description = "Detects win.gearshift." 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.gearshift" 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 = { 4881c4c0000000 5f c3 85c0 0f85a9000000 } // n = 5, score = 200 // 4881c4c0000000 | dec eax // 5f | mov dword ptr [esp + 0x78], esi // c3 | ret // 85c0 | inc ecx // 0f85a9000000 | inc edx $sequence_1 = { 4d8bde 4d2b5d30 0f84a1000000 488b4500 488b5d08 } // n = 5, score = 200 // 4d8bde | dec ebp // 4d2b5d30 | mov ebp, ecx // 0f84a1000000 | dec ebp // 488b4500 | mov edi, eax // 488b5d08 | inc ecx $sequence_2 = { 4883ec28 48833d????????00 740a b801000000 4883c428 c3 488d0dc9a80000 } // n = 7, score = 200 // 4883ec28 | mov dword ptr [eax], ecx // 48833d????????00 | // 740a | jmp 0x8ca // b801000000 | dec eax // 4883c428 | arpl word ptr [esp + 0x34], cx // c3 | dec eax // 488d0dc9a80000 | mov eax, dword ptr [esp + 0x20] $sequence_3 = { 4823f1 66413b7806 0f83ce000000 48895c2448 4c89642450 4c8d25566a0300 4a8d5c003c } // n = 7, score = 200 // 4823f1 | ret // 66413b7806 | xor al, al // 0f83ce000000 | test edx, edx // 48895c2448 | jbe 0x509 // 4c89642450 | dec eax // 4c8d25566a0300 | lea ebp, [ecx - 0x7ff80000] // 4a8d5c003c | jmp 0x50e $sequence_4 = { 83c8ff e9???????? 4c8bfb 4c8be3 488d05363c0300 49c1fc05 } // n = 6, score = 200 // 83c8ff | mov dword ptr [ebp + 0x18], esp // e9???????? | // 4c8bfb | mov eax, dword ptr [esp + 0x70] // 4c8be3 | dec eax // 488d05363c0300 | mov eax, dword ptr [esp + 0x60] // 49c1fc05 | mov eax, edi $sequence_5 = { 4885c0 0f8418010000 4c8d442470 41b910010000 488bd0 488bcb 48897c2420 } // n = 7, score = 200 // 4885c0 | dec esp // 0f8418010000 | mov eax, dword ptr [eax + 0x28] // 4c8d442470 | dec ecx // 41b910010000 | cmp ecx, eax // 488bd0 | jae 0xd3f // 488bcb | mov dword ptr [esp + 8], ecx // 48897c2420 | dec eax $sequence_6 = { 488bd8 ff9688000000 4c8bc3 33d2 488bc8 8947f8 ff96a8000000 } // n = 7, score = 200 // 488bd8 | mov ecx, ebx // ff9688000000 | dec eax // 4c8bc3 | mov eax, ebx // 33d2 | dec eax // 488bc8 | lea edx, [0xab37] // 8947f8 | dec eax // ff96a8000000 | sar eax, 5 $sequence_7 = { 7522 48ffc1 498d0408 493bc3 7cec 4963c2 4803c6 } // n = 7, score = 200 // 7522 | mov ebp, eax // 48ffc1 | mov ebx, edx // 498d0408 | dec eax // 493bc3 | sub esp, 0x150 // 7cec | dec esp // 4963c2 | mov esp, ecx // 4803c6 | dec eax $sequence_8 = { 4533c0 33d2 498bcc 44896c2428 48897c2420 ff15???????? ba01000000 } // n = 7, score = 200 // 4533c0 | mov eax, dword ptr [esp + 0x28] // 33d2 | inc esi // 498bcc | dec eax // 44896c2428 | add ebx, 4 // 48897c2420 | mov dword ptr [ebx - 4], eax // ff15???????? | // ba01000000 | dec eax $sequence_9 = { 0fb7d1 eb09 488b4508 488d540102 } // n = 4, score = 200 // 0fb7d1 | int3 // eb09 | int3 // 488b4508 | int3 // 488d540102 | int3 condition: 7 of them and filesize < 540672 }
rule win_gearshift_w0 { meta: author = "Bundesamt fuer Verfassungsschutz" source = "https://www.verfassungsschutz.de/download/anlage-2019-12-bfv-cyber-brief-2019-01.txt" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.gearshift" malpedia_version = "20191207" malpedia_sharing = "TLP:WHITE" malpedia_license = "" strings: $b1 = { 4C 8D 41 24 33 D2 B9 03 00 1F 00 FF 9? F8 00 00 00 48 85 C0 74 } $b2 = { 4C 8B 4? 08 BA 01 00 00 00 49 8B C? FF D0 85 C0 [2-6] C7 4? 1C 01 00 00 00 B8 01 00 00 00 } $b3 = { 8B 4B E4 8B 53 EC 41 B8 00 40 00 00 4? 0B C? FF 9? B8 00 00 00 EB } condition: (2 of ($b*)) }
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