Actor(s): Tonto Team
There is no description at this point.
rule win_korlia_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-01-25" version = "1" description = "Detects win.korlia." 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.korlia" 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 = { 6a32 50 ff15???????? 85c0 } // n = 4, score = 2700 // 6a32 | push 0x32 // 50 | push eax // ff15???????? | // 85c0 | test eax, eax $sequence_1 = { ff15???????? 85c0 7507 53 ff15???????? 55 } // n = 6, score = 2600 // ff15???????? | // 85c0 | test eax, eax // 7507 | jne 9 // 53 | push ebx // ff15???????? | // 55 | push ebp $sequence_2 = { 8bf8 b83bd4b531 f7ef c1fa18 } // n = 4, score = 2600 // 8bf8 | mov edi, eax // b83bd4b531 | mov eax, 0x31b5d43b // f7ef | imul edi // c1fa18 | sar edx, 0x18 $sequence_3 = { 8965e8 c645e401 c745fc00000000 52 51 53 b868584d56 } // n = 7, score = 2600 // 8965e8 | mov dword ptr [ebp - 0x18], esp // c645e401 | mov byte ptr [ebp - 0x1c], 1 // c745fc00000000 | mov dword ptr [ebp - 4], 0 // 52 | push edx // 51 | push ecx // 53 | push ebx // b868584d56 | mov eax, 0x564d5868 $sequence_4 = { 8bfa f7ef c1fa14 8bc2 c1e81f } // n = 5, score = 2600 // 8bfa | mov edi, edx // f7ef | imul edi // c1fa14 | sar edx, 0x14 // 8bc2 | mov eax, edx // c1e81f | shr eax, 0x1f $sequence_5 = { ffd6 ff15???????? 8bf8 b83bd4b531 } // n = 4, score = 2600 // ffd6 | call esi // ff15???????? | // 8bf8 | mov edi, eax // b83bd4b531 | mov eax, 0x31b5d43b $sequence_6 = { 5b 59 5a c745fcffffffff 8a45e4 } // n = 5, score = 2600 // 5b | pop ebx // 59 | pop ecx // 5a | pop edx // c745fcffffffff | mov dword ptr [ebp - 4], 0xffffffff // 8a45e4 | mov al, byte ptr [ebp - 0x1c] $sequence_7 = { 53 56 57 8965e8 c645e401 c745fc00000000 } // n = 6, score = 2600 // 53 | push ebx // 56 | push esi // 57 | push edi // 8965e8 | mov dword ptr [ebp - 0x18], esp // c645e401 | mov byte ptr [ebp - 0x1c], 1 // c745fc00000000 | mov dword ptr [ebp - 4], 0 $sequence_8 = { 53 6a01 53 53 53 51 } // n = 6, score = 2300 // 53 | push ebx // 6a01 | push 1 // 53 | push ebx // 53 | push ebx // 53 | push ebx // 51 | push ecx $sequence_9 = { e8???????? 83c410 85c0 7f14 } // n = 4, score = 1700 // e8???????? | // 83c410 | add esp, 0x10 // 85c0 | test eax, eax // 7f14 | jg 0x16 $sequence_10 = { f2ae f7d1 2bf9 6810270000 } // n = 4, score = 700 // f2ae | repne scasb al, byte ptr es:[edi] // f7d1 | not ecx // 2bf9 | sub edi, ecx // 6810270000 | push 0x2710 $sequence_11 = { 59 59 c3 8b65e8 ff7588 ff15???????? 833d????????ff } // n = 7, score = 700 // 59 | pop ecx // 59 | pop ecx // c3 | ret // 8b65e8 | mov esp, dword ptr [ebp - 0x18] // ff7588 | push dword ptr [ebp - 0x78] // ff15???????? | // 833d????????ff | $sequence_12 = { 8b4c240c 898840200000 58 c20800 e9???????? } // n = 5, score = 700 // 8b4c240c | mov ecx, dword ptr [esp + 0xc] // 898840200000 | mov dword ptr [eax + 0x2040], ecx // 58 | pop eax // c20800 | ret 8 // e9???????? | $sequence_13 = { ff7588 ff15???????? 833d????????ff 750c ff742404 ff15???????? 59 } // n = 7, score = 700 // ff7588 | push dword ptr [ebp - 0x78] // ff15???????? | // 833d????????ff | // 750c | jne 0xe // ff742404 | push dword ptr [esp + 4] // ff15???????? | // 59 | pop ecx $sequence_14 = { ff742410 e8???????? c21000 e8???????? 8a4c2404 6a01 884814 } // n = 7, score = 700 // ff742410 | push dword ptr [esp + 0x10] // e8???????? | // c21000 | ret 0x10 // e8???????? | // 8a4c2404 | mov cl, byte ptr [esp + 4] // 6a01 | push 1 // 884814 | mov byte ptr [eax + 0x14], cl $sequence_15 = { 894d00 8b542438 83c504 50 895500 83c504 } // n = 6, score = 500 // 894d00 | mov dword ptr [ebp], ecx // 8b542438 | mov edx, dword ptr [esp + 0x38] // 83c504 | add ebp, 4 // 50 | push eax // 895500 | mov dword ptr [ebp], edx // 83c504 | add ebp, 4 $sequence_16 = { 6a00 680030c800 6a00 6a00 } // n = 4, score = 500 // 6a00 | push 0 // 680030c800 | push 0xc83000 // 6a00 | push 0 // 6a00 | push 0 $sequence_17 = { b8447c0000 e8???????? 53 56 } // n = 4, score = 500 // b8447c0000 | mov eax, 0x7c44 // e8???????? | // 53 | push ebx // 56 | push esi $sequence_18 = { 8bf9 81e7ff000000 03f2 03f7 } // n = 4, score = 500 // 8bf9 | mov edi, ecx // 81e7ff000000 | and edi, 0xff // 03f2 | add esi, edx // 03f7 | add esi, edi $sequence_19 = { 85c0 750c ff15???????? 53 } // n = 4, score = 400 // 85c0 | test eax, eax // 750c | jne 0xe // ff15???????? | // 53 | push ebx $sequence_20 = { ffd6 8d44240c 6804010000 50 } // n = 4, score = 400 // ffd6 | call esi // 8d44240c | lea eax, [esp + 0xc] // 6804010000 | push 0x104 // 50 | push eax $sequence_21 = { 51 ff15???????? a1???????? b981000000 } // n = 4, score = 400 // 51 | push ecx // ff15???????? | // a1???????? | // b981000000 | mov ecx, 0x81 $sequence_22 = { 6a00 6880000000 6800000400 8bce } // n = 4, score = 400 // 6a00 | push 0 // 6880000000 | push 0x80 // 6800000400 | push 0x40000 // 8bce | mov ecx, esi $sequence_23 = { 6a00 6a00 50 8bce e8???????? 6a00 } // n = 6, score = 400 // 6a00 | push 0 // 6a00 | push 0 // 50 | push eax // 8bce | mov ecx, esi // e8???????? | // 6a00 | push 0 $sequence_24 = { 33c0 8dbc245e020000 66899c245c020000 f3ab } // n = 4, score = 300 // 33c0 | xor eax, eax // 8dbc245e020000 | lea edi, [esp + 0x25e] // 66899c245c020000 | mov word ptr [esp + 0x25c], bx // f3ab | rep stosd dword ptr es:[edi], eax $sequence_25 = { a1???????? 3bc3 7403 50 ffd6 b912010000 } // n = 6, score = 300 // a1???????? | // 3bc3 | cmp eax, ebx // 7403 | je 5 // 50 | push eax // ffd6 | call esi // b912010000 | mov ecx, 0x112 $sequence_26 = { ff15???????? 85c0 740a 56 50 } // n = 5, score = 300 // ff15???????? | // 85c0 | test eax, eax // 740a | je 0xc // 56 | push esi // 50 | push eax $sequence_27 = { 56 68ff0f1f00 ff15???????? 85c0 } // n = 4, score = 300 // 56 | push esi // 68ff0f1f00 | push 0x1f0fff // ff15???????? | // 85c0 | test eax, eax $sequence_28 = { 740b 8b35???????? 50 ffd6 eb06 8b35???????? a1???????? } // n = 7, score = 300 // 740b | je 0xd // 8b35???????? | // 50 | push eax // ffd6 | call esi // eb06 | jmp 8 // 8b35???????? | // a1???????? | $sequence_29 = { 668944241d 51 52 88442427 e8???????? } // n = 5, score = 100 // 668944241d | mov word ptr [esp + 0x1d], ax // 51 | push ecx // 52 | push edx // 88442427 | mov byte ptr [esp + 0x27], al // e8???????? | $sequence_30 = { aa 33c0 8d4c2428 89442411 51 68???????? 885c2418 } // n = 7, score = 100 // aa | stosb byte ptr es:[edi], al // 33c0 | xor eax, eax // 8d4c2428 | lea ecx, [esp + 0x28] // 89442411 | mov dword ptr [esp + 0x11], eax // 51 | push ecx // 68???????? | // 885c2418 | mov byte ptr [esp + 0x18], bl $sequence_31 = { 6800020000 50 41 6aff } // n = 4, score = 100 // 6800020000 | push 0x200 // 50 | push eax // 41 | inc ecx // 6aff | push -1 $sequence_32 = { 57 e9???????? 8b430c 6a00 } // n = 4, score = 100 // 57 | push edi // e9???????? | // 8b430c | mov eax, dword ptr [ebx + 0xc] // 6a00 | push 0 $sequence_33 = { 84c0 75f8 8bca c1e902 f3a5 8bca 8b5510 } // n = 7, score = 100 // 84c0 | test al, al // 75f8 | jne 0xfffffffa // 8bca | mov ecx, edx // c1e902 | shr ecx, 2 // f3a5 | rep movsd dword ptr es:[edi], dword ptr [esi] // 8bca | mov ecx, edx // 8b5510 | mov edx, dword ptr [ebp + 0x10] $sequence_34 = { 85c9 0f8413050000 8b3c8d64684100 85ff 755d } // n = 5, score = 100 // 85c9 | test ecx, ecx // 0f8413050000 | je 0x519 // 8b3c8d64684100 | mov edi, dword ptr [ecx*4 + 0x416864] // 85ff | test edi, edi // 755d | jne 0x5f $sequence_35 = { e8???????? 56 53 8d857cffffff 50 51 } // n = 6, score = 100 // e8???????? | // 56 | push esi // 53 | push ebx // 8d857cffffff | lea eax, [ebp - 0x84] // 50 | push eax // 51 | push ecx $sequence_36 = { 0f8403010000 6a00 53 ff15???????? 8bf0 8bce } // n = 6, score = 100 // 0f8403010000 | je 0x109 // 6a00 | push 0 // 53 | push ebx // ff15???????? | // 8bf0 | mov esi, eax // 8bce | mov ecx, esi $sequence_37 = { c745cc6c006500 c745d020006500 c745d472007200 c745d86f007200 c745dc3a000000 c7857ce1ffff49006e00 } // n = 6, score = 100 // c745cc6c006500 | mov dword ptr [ebp - 0x34], 0x65006c // c745d020006500 | mov dword ptr [ebp - 0x30], 0x650020 // c745d472007200 | mov dword ptr [ebp - 0x2c], 0x720072 // c745d86f007200 | mov dword ptr [ebp - 0x28], 0x72006f // c745dc3a000000 | mov dword ptr [ebp - 0x24], 0x3a // c7857ce1ffff49006e00 | mov dword ptr [ebp - 0x1e84], 0x6e0049 condition: 7 of them and filesize < 263168 }
rule win_korlia_w0 { meta: author = "Nick Hoffman" company = "CBTS - ACS" information = "korlia malware found in apt dump" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.korlia" malpedia_version = "20180125" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" //case a //b2 1f mov dl, 0x1f ; mov key (wildcard) // ----------------- //8A 86 98 40 00 71 mov al, byte ptr url[esi] //BF 98 40 00 71 mov edi, offset url //32 C2 xor al, dl //83 C9 FF or ecx, 0FFFFFFFFh //88 86 98 40 00 71 mov byte ptr url[esi], al //33 C0 xor eax, eax //46 inc esi //F2 AE repne scasb //F7 D1 not ecx //49 dec ecx //3B F1 cmp esi, ecx //72 DE jb short loc_71001DE0 //case b (variant of loop a) //8A 8A 28 50 40 00 mov cl, byte_405028[edx] //BF 28 50 40 00 mov edi, offset byte_405028 //32 CB xor cl, bl //33 C0 xor eax, eax //88 8A 28 50 40 00 mov byte_405028[edx], cl //83 C9 FF or ecx, 0FFFFFFFFh //42 inc edx //F2 AE repne scasb //F7 D1 not ecx //49 dec ecx //3B D1 cmp edx, ecx //72 DE jb short loc_4047F2 //case c (not a variant of the above loop) //8A 0C 28 mov cl, [eax+ebp] //80 F1 28 xor cl, 28h //88 0C 28 mov [eax+ebp], cl //8B 4C 24 14 mov ecx, [esp+0D78h+var_D64] //40 inc eax //3B C1 cmp eax, ecx //7C EE jl short loc_404F1C strings: $a = {b2 ?? 8A 86 98 40 00 71 BF 98 40 00 71 32 c2 83 C9 FF 88 86 98 40 00 71 33 C0 46 F2 AE F7 D1 49 3B F1} $b = {B3 ?? ?? ?? 8A 8A 28 50 40 00 BF 28 50 40 00 32 CB 33 C0 88 8A 28 50 40 00 83 C9 FF 42 F2 AE F7 D1 49 3B D1} $c = {8A 0C 28 80 F1 ?? 88 0C 28 8B 4C 24 14 40 3B C1} $d = {00 62 69 73 6F 6E 61 6C 00} //config marker "\x00bisonal\x00" condition: any of them }
rule win_korlia_w1 { meta: author = "pinksawtooth" source = "https://github.com/nao-sec/yara_rules/blob/master/Malware/bisonal.yar" reference = "https://www.paloaltonetworks.jp/company/in-the-news/2018/unit42-bisonal-malware-used-attacks-russia-south-korea" description = "rule to detect korlia/bisonal" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.korlia" malpedia_rule_date = "20210204" malpedia_hash = "" malpedia_version = "20210204" malpedia_license = "CC BY-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $s1 = "akspbu.txt" ascii wide $s2 = "ks8d" ascii wide $s3 = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322" ascii wide /* bisonal_decode_jsac */ $decode = { bb bf 58 00 00 [0-2] 8d 0c 40 c1 e1 04 2b c8 8d 0c 49 8d 0c 89 8d 0c c9 8d 04 48 83 c9 ff } condition: uint16(0) == 0x5A4D and (all of ($s*) or $decode) }
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