Vidar is a forked malware based on Arkei. It seems this stealer is one of the first that is grabbing information on 2FA Software and Tor Browser.
rule win_vidar_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-07-11" version = "1" description = "Detects win.vidar." 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.vidar" 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 = { 25ff7f0000 c3 e8???????? 8b486c 3b0d???????? } // n = 5, score = 2600 // 25ff7f0000 | and eax, 0x7fff // c3 | ret // e8???????? | // 8b486c | mov ecx, dword ptr [eax + 0x6c] // 3b0d???????? | $sequence_1 = { 7202 8b00 8d8d68fdffff 51 } // n = 4, score = 2500 // 7202 | jb 4 // 8b00 | mov eax, dword ptr [eax] // 8d8d68fdffff | lea ecx, [ebp - 0x298] // 51 | push ecx $sequence_2 = { 8d8d68fdffff 51 50 ff15???????? } // n = 4, score = 2500 // 8d8d68fdffff | lea ecx, [ebp - 0x298] // 51 | push ecx // 50 | push eax // ff15???????? | $sequence_3 = { 8b8648af0100 c1e803 038644af0100 5e 5d c3 } // n = 6, score = 2400 // 8b8648af0100 | mov eax, dword ptr [esi + 0x1af48] // c1e803 | shr eax, 3 // 038644af0100 | add eax, dword ptr [esi + 0x1af44] // 5e | pop esi // 5d | pop ebp // c3 | ret $sequence_4 = { 89b55cfdffff 89bd60fdffff 8d450c 50 } // n = 4, score = 2400 // 89b55cfdffff | mov dword ptr [ebp - 0x2a4], esi // 89bd60fdffff | mov dword ptr [ebp - 0x2a0], edi // 8d450c | lea eax, [ebp + 0xc] // 50 | push eax $sequence_5 = { 56 8b742408 8b865caf0100 57 83f808 } // n = 5, score = 2400 // 56 | push esi // 8b742408 | mov esi, dword ptr [esp + 8] // 8b865caf0100 | mov eax, dword ptr [esi + 0x1af5c] // 57 | push edi // 83f808 | cmp eax, 8 $sequence_6 = { 5f c6043300 8bc6 5e 5b c20400 } // n = 6, score = 2400 // 5f | pop edi // c6043300 | mov byte ptr [ebx + esi], 0 // 8bc6 | mov eax, esi // 5e | pop esi // 5b | pop ebx // c20400 | ret 4 $sequence_7 = { 895dfc e8???????? 83781408 c645fc01 } // n = 4, score = 2400 // 895dfc | mov dword ptr [ebp - 4], ebx // e8???????? | // 83781408 | cmp dword ptr [eax + 0x14], 8 // c645fc01 | mov byte ptr [ebp - 4], 1 $sequence_8 = { 740a b800000500 e9???????? 57 } // n = 4, score = 2400 // 740a | je 0xc // b800000500 | mov eax, 0x50000 // e9???????? | // 57 | push edi $sequence_9 = { 8b7508 33ff 89b55cfdffff 89bd60fdffff } // n = 4, score = 2400 // 8b7508 | mov esi, dword ptr [ebp + 8] // 33ff | xor edi, edi // 89b55cfdffff | mov dword ptr [ebp - 0x2a4], esi // 89bd60fdffff | mov dword ptr [ebp - 0x2a0], edi $sequence_10 = { 895dd0 c746140f000000 895e10 8975cc } // n = 4, score = 2400 // 895dd0 | mov dword ptr [ebp - 0x30], ebx // c746140f000000 | mov dword ptr [esi + 0x14], 0xf // 895e10 | mov dword ptr [esi + 0x10], ebx // 8975cc | mov dword ptr [ebp - 0x34], esi $sequence_11 = { 50 ff15???????? 8b4da0 8901 } // n = 4, score = 2300 // 50 | push eax // ff15???????? | // 8b4da0 | mov ecx, dword ptr [ebp - 0x60] // 8901 | mov dword ptr [ecx], eax $sequence_12 = { ff15???????? 8b45ec 8b4dee 83c0c4 } // n = 4, score = 2300 // ff15???????? | // 8b45ec | mov eax, dword ptr [ebp - 0x14] // 8b4dee | mov ecx, dword ptr [ebp - 0x12] // 83c0c4 | add eax, -0x3c $sequence_13 = { ff15???????? 85c0 750a b800020000 e9???????? 8b4dc8 33c0 } // n = 7, score = 2300 // ff15???????? | // 85c0 | test eax, eax // 750a | jne 0xc // b800020000 | mov eax, 0x200 // e9???????? | // 8b4dc8 | mov ecx, dword ptr [ebp - 0x38] // 33c0 | xor eax, eax $sequence_14 = { 5e c20400 ff742408 e8???????? 59 83f8ff } // n = 6, score = 2300 // 5e | pop esi // c20400 | ret 4 // ff742408 | push dword ptr [esp + 8] // e8???????? | // 59 | pop ecx // 83f8ff | cmp eax, -1 $sequence_15 = { 83781410 7202 8b00 50 8b45a0 } // n = 5, score = 2300 // 83781410 | cmp dword ptr [eax + 0x14], 0x10 // 7202 | jb 4 // 8b00 | mov eax, dword ptr [eax] // 50 | push eax // 8b45a0 | mov eax, dword ptr [ebp - 0x60] $sequence_16 = { e8???????? 59 83f8ff 7503 32c0 c3 } // n = 6, score = 2300 // e8???????? | // 59 | pop ecx // 83f8ff | cmp eax, -1 // 7503 | jne 5 // 32c0 | xor al, al // c3 | ret $sequence_17 = { c9 c3 8b542408 85d2 7503 33c0 } // n = 6, score = 2300 // c9 | leave // c3 | ret // 8b542408 | mov edx, dword ptr [esp + 8] // 85d2 | test edx, edx // 7503 | jne 5 // 33c0 | xor eax, eax $sequence_18 = { d91c24 50 e8???????? 8365fc00 50 } // n = 5, score = 2300 // d91c24 | fstp dword ptr [esp] // 50 | push eax // e8???????? | // 8365fc00 | and dword ptr [ebp - 4], 0 // 50 | push eax $sequence_19 = { 399e70af0600 7514 c78678af060001000000 c78670af060000000100 68fcff0100 8d8670af0400 53 } // n = 7, score = 2100 // 399e70af0600 | cmp dword ptr [esi + 0x6af70], ebx // 7514 | jne 0x16 // c78678af060001000000 | mov dword ptr [esi + 0x6af78], 1 // c78670af060000000100 | mov dword ptr [esi + 0x6af70], 0x10000 // 68fcff0100 | push 0x1fffc // 8d8670af0400 | lea eax, [esi + 0x4af70] // 53 | push ebx $sequence_20 = { 53 68???????? 8d8da8000000 e8???????? } // n = 4, score = 2100 // 53 | push ebx // 68???????? | // 8d8da8000000 | lea ecx, [ebp + 0xa8] // e8???????? | $sequence_21 = { 53 50 899e6caf0600 e8???????? } // n = 4, score = 2100 // 53 | push ebx // 50 | push eax // 899e6caf0600 | mov dword ptr [esi + 0x6af6c], ebx // e8???????? | $sequence_22 = { c20400 56 8bf1 e8???????? 6a00 ff74240c } // n = 6, score = 1800 // c20400 | ret 4 // 56 | push esi // 8bf1 | mov esi, ecx // e8???????? | // 6a00 | push 0 // ff74240c | push dword ptr [esp + 0xc] $sequence_23 = { 8b4120 8910 8b4130 8910 c3 56 } // n = 6, score = 1800 // 8b4120 | mov eax, dword ptr [ecx + 0x20] // 8910 | mov dword ptr [eax], edx // 8b4130 | mov eax, dword ptr [ecx + 0x30] // 8910 | mov dword ptr [eax], edx // c3 | ret // 56 | push esi $sequence_24 = { 8b4508 8906 8b450c 894608 8b4510 } // n = 5, score = 1800 // 8b4508 | mov eax, dword ptr [ebp + 8] // 8906 | mov dword ptr [esi], eax // 8b450c | mov eax, dword ptr [ebp + 0xc] // 894608 | mov dword ptr [esi + 8], eax // 8b4510 | mov eax, dword ptr [ebp + 0x10] $sequence_25 = { 0faf450c 50 e8???????? 59 } // n = 4, score = 1800 // 0faf450c | imul eax, dword ptr [ebp + 0xc] // 50 | push eax // e8???????? | // 59 | pop ecx $sequence_26 = { e8???????? 83c410 85c0 7404 6a99 ebcc } // n = 6, score = 600 // e8???????? | // 83c410 | add esp, 0x10 // 85c0 | test eax, eax // 7404 | je 6 // 6a99 | push -0x67 // ebcc | jmp 0xffffffce $sequence_27 = { 7702 04e0 84c9 7410 84c0 7406 3ac8 } // n = 7, score = 500 // 7702 | ja 4 // 04e0 | add al, 0xe0 // 84c9 | test cl, cl // 7410 | je 0x12 // 84c0 | test al, al // 7406 | je 8 // 3ac8 | cmp cl, al $sequence_28 = { e8???????? 83c408 84c0 740e 68???????? } // n = 5, score = 300 // e8???????? | // 83c408 | add esp, 8 // 84c0 | test al, al // 740e | je 0x10 // 68???????? | $sequence_29 = { 83ec08 dd4508 dd1c24 6a0b 6a10 e8???????? 83c41c } // n = 7, score = 200 // 83ec08 | sub esp, 8 // dd4508 | fld qword ptr [ebp + 8] // dd1c24 | fstp qword ptr [esp] // 6a0b | push 0xb // 6a10 | push 0x10 // e8???????? | // 83c41c | add esp, 0x1c $sequence_30 = { 8bc3 2bc1 50 51 57 e8???????? 8b4608 } // n = 7, score = 100 // 8bc3 | mov eax, ebx // 2bc1 | sub eax, ecx // 50 | push eax // 51 | push ecx // 57 | push edi // e8???????? | // 8b4608 | mov eax, dword ptr [esi + 8] $sequence_31 = { 8bc2 eb02 33c0 c1e006 0bc8 395f6c } // n = 6, score = 100 // 8bc2 | mov eax, edx // eb02 | jmp 4 // 33c0 | xor eax, eax // c1e006 | shl eax, 6 // 0bc8 | or ecx, eax // 395f6c | cmp dword ptr [edi + 0x6c], ebx $sequence_32 = { 8bc2 c1e81f 03ca 03c1 2b05???????? } // n = 5, score = 100 // 8bc2 | mov eax, edx // c1e81f | shr eax, 0x1f // 03ca | add ecx, edx // 03c1 | add eax, ecx // 2b05???????? | $sequence_33 = { 8bc2 c7461400000000 c746180f000000 c6460400 } // n = 4, score = 100 // 8bc2 | mov eax, edx // c7461400000000 | mov dword ptr [esi + 0x14], 0 // c746180f000000 | mov dword ptr [esi + 0x18], 0xf // c6460400 | mov byte ptr [esi + 4], 0 condition: 7 of them and filesize < 2793472 }
rule win_vidar_w0 { meta: description = "Yara rule for detecting Vidar stealer" author = "Fumik0_" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.vidar" malpedia_version = "20190106" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $s1 = { 56 69 64 61 72 } $s2 = { 31 42 45 46 30 41 35 37 42 45 31 31 30 46 44 34 36 37 41 } condition: all 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