Actor(s): Pirate Panda
There is no description at this point.
rule win_keyboy_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-07-11" version = "1" description = "Detects win.keyboy." 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.keyboy" malpedia_rule_date = "20230705" malpedia_hash = "42d0574f4405bd7d2b154d321d345acb18834a41" malpedia_version = "20230715" 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 = { 51 ff75d8 6a00 ff75c0 } // n = 4, score = 600 // 51 | push ecx // ff75d8 | push dword ptr [ebp - 0x28] // 6a00 | push 0 // ff75c0 | push dword ptr [ebp - 0x40] $sequence_1 = { 6a00 8945f2 8d45f8 50 6a0e } // n = 5, score = 600 // 6a00 | push 0 // 8945f2 | mov dword ptr [ebp - 0xe], eax // 8d45f8 | lea eax, [ebp - 8] // 50 | push eax // 6a0e | push 0xe $sequence_2 = { c705????????0caa6c89 c705????????a856701f c705????????597e743c c705????????0a9769e0 c705????????c4b85363 } // n = 5, score = 500 // c705????????0caa6c89 | // c705????????a856701f | // c705????????597e743c | // c705????????0a9769e0 | // c705????????c4b85363 | $sequence_3 = { c3 3b0d???????? f27502 f2c3 f2e953030000 55 } // n = 6, score = 500 // c3 | ret // 3b0d???????? | // f27502 | bnd jne 5 // f2c3 | bnd ret // f2e953030000 | bnd jmp 0x359 // 55 | push ebp $sequence_4 = { c705????????c4b85363 c705????????3abf261f c705????????890e9944 c705????????dbd99823 c705????????d468bcb5 c705????????2086e659 } // n = 6, score = 500 // c705????????c4b85363 | // c705????????3abf261f | // c705????????890e9944 | // c705????????dbd99823 | // c705????????d468bcb5 | // c705????????2086e659 | $sequence_5 = { c705????????d468bcb5 c705????????2086e659 c705????????eec45abf c705????????bbee2bd1 c705????????3e20f129 c705????????42be62c1 c705????????1a78e4c7 } // n = 7, score = 500 // c705????????d468bcb5 | // c705????????2086e659 | // c705????????eec45abf | // c705????????bbee2bd1 | // c705????????3e20f129 | // c705????????42be62c1 | // c705????????1a78e4c7 | $sequence_6 = { 83c9f8 41 8a043e 0fbe4c8de0 3401 } // n = 5, score = 400 // 83c9f8 | or ecx, 0xfffffff8 // 41 | inc ecx // 8a043e | mov al, byte ptr [esi + edi] // 0fbe4c8de0 | movsx ecx, byte ptr [ebp + ecx*4 - 0x20] // 3401 | xor al, 1 $sequence_7 = { f7d9 85db 0f44c2 23c8 } // n = 4, score = 400 // f7d9 | neg ecx // 85db | test ebx, ebx // 0f44c2 | cmove eax, edx // 23c8 | and ecx, eax $sequence_8 = { c1e810 884106 8bc2 c1e808 } // n = 4, score = 400 // c1e810 | shr eax, 0x10 // 884106 | mov byte ptr [ecx + 6], al // 8bc2 | mov eax, edx // c1e808 | shr eax, 8 $sequence_9 = { 8b4df8 8bd6 e8???????? 6a00 ffb524fdffff } // n = 5, score = 400 // 8b4df8 | mov ecx, dword ptr [ebp - 8] // 8bd6 | mov edx, esi // e8???????? | // 6a00 | push 0 // ffb524fdffff | push dword ptr [ebp - 0x2dc] $sequence_10 = { 85c0 741d ff15???????? 6afe 8d45f0 } // n = 5, score = 400 // 85c0 | test eax, eax // 741d | je 0x1f // ff15???????? | // 6afe | push -2 // 8d45f0 | lea eax, [ebp - 0x10] $sequence_11 = { ffd0 e9???????? bbfeffffff eb05 } // n = 4, score = 400 // ffd0 | call eax // e9???????? | // bbfeffffff | mov ebx, 0xfffffffe // eb05 | jmp 7 $sequence_12 = { c745e453686c77 c745e861706900 ffd0 8bf0 c745dc5368656c } // n = 5, score = 400 // c745e453686c77 | mov dword ptr [ebp - 0x1c], 0x776c6853 // c745e861706900 | mov dword ptr [ebp - 0x18], 0x697061 // ffd0 | call eax // 8bf0 | mov esi, eax // c745dc5368656c | mov dword ptr [ebp - 0x24], 0x6c656853 $sequence_13 = { 8b75bc 8bce 8b15???????? a3???????? e8???????? } // n = 5, score = 400 // 8b75bc | mov esi, dword ptr [ebp - 0x44] // 8bce | mov ecx, esi // 8b15???????? | // a3???????? | // e8???????? | $sequence_14 = { e8???????? 85c0 755e 83ff20 } // n = 4, score = 400 // e8???????? | // 85c0 | test eax, eax // 755e | jne 0x60 // 83ff20 | cmp edi, 0x20 $sequence_15 = { 3bf2 7cd6 5f 5e 8be5 5d } // n = 6, score = 400 // 3bf2 | cmp esi, edx // 7cd6 | jl 0xffffffd8 // 5f | pop edi // 5e | pop esi // 8be5 | mov esp, ebp // 5d | pop ebp $sequence_16 = { e8???????? 6a7c 8d4580 c7857cffffff736c6d00 } // n = 4, score = 400 // e8???????? | // 6a7c | push 0x7c // 8d4580 | lea eax, [ebp - 0x80] // c7857cffffff736c6d00 | mov dword ptr [ebp - 0x84], 0x6d6c73 $sequence_17 = { 0fbe4c8de0 3401 0fbec0 0fafc8 80f185 880c3e 46 } // n = 7, score = 400 // 0fbe4c8de0 | movsx ecx, byte ptr [ebp + ecx*4 - 0x20] // 3401 | xor al, 1 // 0fbec0 | movsx eax, al // 0fafc8 | imul ecx, eax // 80f185 | xor cl, 0x85 // 880c3e | mov byte ptr [esi + edi], cl // 46 | inc esi $sequence_18 = { e8???????? 85c0 790b b883ffffff } // n = 4, score = 400 // e8???????? | // 85c0 | test eax, eax // 790b | jns 0xd // b883ffffff | mov eax, 0xffffff83 $sequence_19 = { f6d8 1ac0 24dd 88474e e8???????? } // n = 5, score = 400 // f6d8 | neg al // 1ac0 | sbb al, al // 24dd | and al, 0xdd // 88474e | mov byte ptr [edi + 0x4e], al // e8???????? | $sequence_20 = { 24a0 3ca0 7518 b800080000 } // n = 4, score = 400 // 24a0 | and al, 0xa0 // 3ca0 | cmp al, 0xa0 // 7518 | jne 0x1a // b800080000 | mov eax, 0x800 $sequence_21 = { 8bf2 c745f470646174 66c745f86500 8a02 42 84c0 75f9 } // n = 7, score = 400 // 8bf2 | mov esi, edx // c745f470646174 | mov dword ptr [ebp - 0xc], 0x74616470 // 66c745f86500 | mov word ptr [ebp - 8], 0x65 // 8a02 | mov al, byte ptr [edx] // 42 | inc edx // 84c0 | test al, al // 75f9 | jne 0xfffffffb $sequence_22 = { c705????????ba66ea37 c705????????1671e665 c705????????f3106cb3 c705????????526c1ed0 c705????????5d05606c c705????????d18e5285 c705????????7c42ca7f } // n = 7, score = 400 // c705????????ba66ea37 | // c705????????1671e665 | // c705????????f3106cb3 | // c705????????526c1ed0 | // c705????????5d05606c | // c705????????d18e5285 | // c705????????7c42ca7f | $sequence_23 = { b901000000 eb0f 3cfe 7509 } // n = 4, score = 400 // b901000000 | mov ecx, 1 // eb0f | jmp 0x11 // 3cfe | cmp al, 0xfe // 7509 | jne 0xb $sequence_24 = { 8bd9 6a00 50 e8???????? 83c40c 8d85fcf7ffff } // n = 6, score = 400 // 8bd9 | mov ebx, ecx // 6a00 | push 0 // 50 | push eax // e8???????? | // 83c40c | add esp, 0xc // 8d85fcf7ffff | lea eax, [ebp - 0x804] condition: 7 of them and filesize < 2170880 }
import "pe" rule win_keyboy_w0 { meta: author = "Florian Roth" reference = "http://www.pwc.co.uk/issues/cyber-security-data-privacy/research/the-keyboys-are-back-in-town.html" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.keyboy" malpedia_version = "20180301" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $x1 = "reg add HKLM\\%s\\Parameters /v ServiceDll /t REG_EXPAND_SZ /d \"%s\" /f" fullword ascii $x3 = "Internet using \\svchost.exe -k -n 3" fullword ascii $x4 = "reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\" /v SFCDisable /t REG_DWORD /d 4 /f" fullword ascii $s1 = "sc create %s binpath= \"%s\" Type= share Start= auto DisplayName= \"%s\"" fullword ascii $s2 = "ExecCmd:%s" fullword ascii $s3 = "szCommand : %s" fullword ascii $s4 = "Current user is a member of the %s\\%s group" fullword ascii $s5 = "icacls %s /grant administrators:F" fullword ascii $s6 = "Ping 127.0.0.1 goto Repeat" fullword ascii $s7 = "Start MoveFile %s -> %s" fullword ascii $s8 = "move %s\\dllcache%s %s\\dllcache\\%s" fullword ascii $s9 = "%s\\cmd.exe /c \"%s\"" fullword ascii condition: pe.imphash() == "68f7eced34c46808756db4b0c45fb589" or ( pe.exports("Insys") and pe.exports("Inuser") and pe.exports("SSSS") ) or 1 of ($x*) or 4 of them }
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