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 = "2022-04-08" 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 = "20220405" malpedia_hash = "ecd38294bd47d5589be5cd5490dc8bb4804afc2a" malpedia_version = "20220411" 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 = { 488d1587ae0000 498bcc 48894528 ff15???????? 488d1563af0000 498bcc } // n = 6, score = 200 // 488d1587ae0000 | inc ecx // 498bcc | push esi // 48894528 | inc ecx // ff15???????? | // 488d1563af0000 | push edi // 498bcc | dec eax $sequence_1 = { 48895c2420 ff15???????? 488d1597a90000 488bc8 } // n = 4, score = 200 // 48895c2420 | dec esp // ff15???????? | // 488d1597a90000 | lea ecx, dword ptr [0xffff7ad2] // 488bc8 | dec ecx $sequence_2 = { c705????????00010000 b800010000 488b8c24c0000000 4833cc e8???????? } // n = 5, score = 200 // c705????????00010000 | // b800010000 | dec eax // 488b8c24c0000000 | mov ebx, dword ptr [esp + 0x30] // 4833cc | dec eax // e8???????? | $sequence_3 = { 7505 e8???????? 488d3d803e0300 41b804010000 33c9 488bd7 } // n = 6, score = 200 // 7505 | dec eax // e8???????? | // 488d3d803e0300 | lea edx, dword ptr [0xb814] // 41b804010000 | dec eax // 33c9 | test eax, eax // 488bd7 | je 0x7b9 $sequence_4 = { 755a 488d0db30c0000 e8???????? 488d1d87680000 } // n = 4, score = 200 // 755a | jne 0xffffff33 // 488d0db30c0000 | dec esp // e8???????? | // 488d1d87680000 | lea ecx, dword ptr [0xffffa974] $sequence_5 = { 7ce0 488b7c2438 488b4b10 e8???????? 488b4b08 488b742430 4885c9 } // n = 7, score = 200 // 7ce0 | dec eax // 488b7c2438 | add ebp, 2 // 488b4b10 | cmp edi, dword ptr [ebx + 0x18] // e8???????? | // 488b4b08 | jb 0xbf0 // 488b742430 | xor eax, eax // 4885c9 | dec eax $sequence_6 = { 66666666660f1f840000000000 48b80000000000000080 4885c8 7405 0fb7d1 eb09 } // n = 6, score = 200 // 66666666660f1f840000000000 | mov dword ptr [esp + 0x40], eax // 48b80000000000000080 | dec eax // 4885c8 | mov eax, dword ptr [esp + 0x40] // 7405 | movzx eax, byte ptr [eax] // 0fb7d1 | mov byte ptr [esp + 0x20], al // eb09 | jmp 0xbf5 $sequence_7 = { 44896c2444 ff15???????? 85c0 741a } // n = 4, score = 200 // 44896c2444 | dec ebp // ff15???????? | // 85c0 | add eax, dword ptr [ecx + ecx*8 + 0x16ae0] // 741a | inc ecx $sequence_8 = { 4533c0 33d2 498bcc 44896c2428 48897c2420 ff15???????? ba01000000 } // n = 7, score = 200 // 4533c0 | jne 0x1a3 // 33d2 | dec eax // 498bcc | lea eax, dword ptr [0xfc87] // 44896c2428 | jmp 0x1a7 // 48897c2420 | dec eax // ff15???????? | // ba01000000 | add eax, 0x10 $sequence_9 = { ffd0 488b4d7f 85c0 490f48cc } // n = 4, score = 200 // ffd0 | cmp eax, 5 // 488b4d7f | jne 0x60f // 85c0 | mov eax, dword ptr [esp + 0x28] // 490f48cc | mov eax, dword ptr [esp + 0x28] 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.
Please propose all changes regarding references on the Malpedia library page
Your suggestion will be reviewed before being published. Thank you for contributing!
YYYY-MM-DD
YYYY-MM
YYYY