This is a stealer used by LockBit 2.0.
rule win_stealbit_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-01-25" version = "1" description = "Detects win.stealbit." 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.stealbit" malpedia_rule_date = "20230124" malpedia_hash = "2ee0eebba83dce3d019a90519f2f972c0fcf9686" malpedia_version = "20230125" 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 = { 894104 83c108 3b4d08 72ec 5d c3 e8???????? } // n = 7, score = 300 // 894104 | mov dword ptr [ecx + 4], eax // 83c108 | add ecx, 8 // 3b4d08 | cmp ecx, dword ptr [ebp + 8] // 72ec | jb 0xffffffee // 5d | pop ebp // c3 | ret // e8???????? | $sequence_1 = { e8???????? 8d1c4502000000 8bcb e8???????? 8bf8 85ff 740b } // n = 7, score = 300 // e8???????? | // 8d1c4502000000 | lea ebx, [eax*2 + 2] // 8bcb | mov ecx, ebx // e8???????? | // 8bf8 | mov edi, eax // 85ff | test edi, edi // 740b | je 0xd $sequence_2 = { 894204 8bc2 5d c20400 8bd1 } // n = 5, score = 300 // 894204 | mov dword ptr [edx + 4], eax // 8bc2 | mov eax, edx // 5d | pop ebp // c20400 | ret 4 // 8bd1 | mov edx, ecx $sequence_3 = { 5f 0f99c1 5e 8bc1 5b 5d c3 } // n = 7, score = 300 // 5f | pop edi // 0f99c1 | setns cl // 5e | pop esi // 8bc1 | mov eax, ecx // 5b | pop ebx // 5d | pop ebp // c3 | ret $sequence_4 = { 3d8217677e 740b 46 3bf7 75e4 33c0 5f } // n = 7, score = 300 // 3d8217677e | cmp eax, 0x7e671782 // 740b | je 0xd // 46 | inc esi // 3bf7 | cmp esi, edi // 75e4 | jne 0xffffffe6 // 33c0 | xor eax, eax // 5f | pop edi $sequence_5 = { 59 85c0 0f8438040000 57 8d9504ffffff } // n = 5, score = 300 // 59 | pop ecx // 85c0 | test eax, eax // 0f8438040000 | je 0x43e // 57 | push edi // 8d9504ffffff | lea edx, [ebp - 0xfc] $sequence_6 = { 660f6fc2 660f73db02 660f73fa0e 660febda 660fe75c0f10 83c120 } // n = 6, score = 300 // 660f6fc2 | movdqa xmm0, xmm2 // 660f73db02 | psrldq xmm3, 2 // 660f73fa0e | pslldq xmm2, 0xe // 660febda | por xmm3, xmm2 // 660fe75c0f10 | movntdq xmmword ptr [edi + ecx + 0x10], xmm3 // 83c120 | add ecx, 0x20 $sequence_7 = { 663bc6 7444 663bc7 743f 663bc3 743a 663bc1 } // n = 7, score = 300 // 663bc6 | cmp ax, si // 7444 | je 0x46 // 663bc7 | cmp ax, di // 743f | je 0x41 // 663bc3 | cmp ax, bx // 743a | je 0x3c // 663bc1 | cmp ax, cx $sequence_8 = { 58 6a6f 6689458c 58 6a7a 6689458e 58 } // n = 7, score = 300 // 58 | pop eax // 6a6f | push 0x6f // 6689458c | mov word ptr [ebp - 0x74], ax // 58 | pop eax // 6a7a | push 0x7a // 6689458e | mov word ptr [ebp - 0x72], ax // 58 | pop eax $sequence_9 = { 6a73 6689bdd0feffff 6689bda4feffff 5f 6a2e 668985acfeffff 58 } // n = 7, score = 300 // 6a73 | push 0x73 // 6689bdd0feffff | mov word ptr [ebp - 0x130], di // 6689bda4feffff | mov word ptr [ebp - 0x15c], di // 5f | pop edi // 6a2e | push 0x2e // 668985acfeffff | mov word ptr [ebp - 0x154], ax // 58 | pop eax condition: 7 of them and filesize < 131072 }
rule win_stealbit_w0 { meta: description = "Detects Stealbit used by Lockbit 2.0 Ransomware Gang" author = "Frank Boldewin (@r3c0nst)" reference = "https://raw.githubusercontent.com/fboldewin/YARA-rules/master/Lockbit2.Stealbit.yar" date = "2021-08-12" hash1 = "3407f26b3d69f1dfce76782fee1256274cf92f744c65aa1ff2d3eaaaf61b0b1d" hash2 = "bd14872dd9fdead89fc074fdc5832caea4ceac02983ec41f814278130b3f943e" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.stealbit" malpedia_rule_date = "20210818" malpedia_hash = "" malpedia_version = "20210818" malpedia_license = "CC BY-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $C2Decryption = {33 C9 8B C1 83 E0 0F 8A 80 ?? ?? ?? ?? 30 81 ?? ?? ?? ?? 41 83 F9 7C 72 E9 E8} condition: uint16(0) == 0x5A4D and filesize < 100KB and $C2Decryption }
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