Actor(s): TeleBots, Sandworm
There is no description at this point.
rule win_eternal_petya_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2020-12-22" version = "1" description = "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.eternal_petya" malpedia_rule_date = "20201222" malpedia_hash = "30354d830a29f0fbd3714d93d94dea941d77a130" malpedia_version = "20201023" 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 = { 8bec 51 57 68000000f0 } // n = 4, score = 400 // 8bec | mov ebp, esp // 51 | push ecx // 57 | push edi // 68000000f0 | push 0xf0000000 $sequence_1 = { 68f0000000 6a40 ff15???????? 8bd8 } // n = 4, score = 400 // 68f0000000 | push 0xf0 // 6a40 | push 0x40 // ff15???????? | // 8bd8 | mov ebx, eax $sequence_2 = { 57 68000000f0 6a18 33ff } // n = 4, score = 400 // 57 | push edi // 68000000f0 | push 0xf0000000 // 6a18 | push 0x18 // 33ff | xor edi, edi $sequence_3 = { 53 8d4644 50 53 6a02 } // n = 5, score = 400 // 53 | push ebx // 8d4644 | lea eax, [esi + 0x44] // 50 | push eax // 53 | push ebx // 6a02 | push 2 $sequence_4 = { 40 49 75f9 56 ff15???????? } // n = 5, score = 400 // 40 | inc eax // 49 | dec ecx // 75f9 | jne 0xfffffffb // 56 | push esi // ff15???????? | $sequence_5 = { 53 6a21 8d460c 50 } // n = 4, score = 400 // 53 | push ebx // 6a21 | push 0x21 // 8d460c | lea eax, [esi + 0xc] // 50 | push eax $sequence_6 = { 50 8d8594f9ffff 50 894dac } // n = 4, score = 300 // 50 | push eax // 8d8594f9ffff | lea eax, [ebp - 0x66c] // 50 | push eax // 894dac | mov dword ptr [ebp - 0x54], ecx $sequence_7 = { ff75f8 8945fc ff15???????? 56 56 6a02 56 } // n = 7, score = 300 // ff75f8 | push dword ptr [ebp - 8] // 8945fc | mov dword ptr [ebp - 4], eax // ff15???????? | // 56 | push esi // 56 | push esi // 6a02 | push 2 // 56 | push esi $sequence_8 = { ff7608 03c1 50 ff15???????? } // n = 4, score = 300 // ff7608 | push dword ptr [esi + 8] // 03c1 | add eax, ecx // 50 | push eax // ff15???????? | $sequence_9 = { 0fb7044a 6685c0 7412 0fb7444584 66890c47 0fb7044a 66ff444584 } // n = 7, score = 300 // 0fb7044a | movzx eax, word ptr [edx + ecx*2] // 6685c0 | test ax, ax // 7412 | je 0x14 // 0fb7444584 | movzx eax, word ptr [ebp + eax*2 - 0x7c] // 66890c47 | mov word ptr [edi + eax*2], cx // 0fb7044a | movzx eax, word ptr [edx + ecx*2] // 66ff444584 | inc word ptr [ebp + eax*2 - 0x7c] $sequence_10 = { 83e001 89412c 8b4320 c7403001000000 } // n = 4, score = 300 // 83e001 | and eax, 1 // 89412c | mov dword ptr [ecx + 0x2c], eax // 8b4320 | mov eax, dword ptr [ebx + 0x20] // c7403001000000 | mov dword ptr [eax + 0x30], 1 $sequence_11 = { 8b4d0c 0fb71441 8955f0 3bd3 0f862fffffff 8b45cc } // n = 6, score = 300 // 8b4d0c | mov ecx, dword ptr [ebp + 0xc] // 0fb71441 | movzx edx, word ptr [ecx + eax*2] // 8955f0 | mov dword ptr [ebp - 0x10], edx // 3bd3 | cmp edx, ebx // 0f862fffffff | jbe 0xffffff35 // 8b45cc | mov eax, dword ptr [ebp - 0x34] $sequence_12 = { 2bc1 d1f8 8d440002 50 6a08 ffd6 50 } // n = 7, score = 300 // 2bc1 | sub eax, ecx // d1f8 | sar eax, 1 // 8d440002 | lea eax, [eax + eax + 2] // 50 | push eax // 6a08 | push 8 // ffd6 | call esi // 50 | push eax $sequence_13 = { 83e001 894304 8bc2 83e003 83e800 } // n = 5, score = 300 // 83e001 | and eax, 1 // 894304 | mov dword ptr [ebx + 4], eax // 8bc2 | mov eax, edx // 83e003 | and eax, 3 // 83e800 | sub eax, 0 $sequence_14 = { 75f5 2bcf d1f9 8d1409 8bce 85d2 } // n = 6, score = 200 // 75f5 | jne 0xfffffff7 // 2bcf | sub ecx, edi // d1f9 | sar ecx, 1 // 8d1409 | lea edx, [ecx + ecx] // 8bce | mov ecx, esi // 85d2 | test edx, edx $sequence_15 = { 50 ffd6 85c0 0f8480000000 8b95f4fdffff 8d8df8fdffff } // n = 6, score = 200 // 50 | push eax // ffd6 | call esi // 85c0 | test eax, eax // 0f8480000000 | je 0x86 // 8b95f4fdffff | mov edx, dword ptr [ebp - 0x20c] // 8d8df8fdffff | lea ecx, [ebp - 0x208] condition: 7 of them and filesize < 851968 }
rule win_eternal_petya_w0 { meta: author = "ReversingLabs" date = "2017-11-29" source = "https://www.reversinglabs.com/newsroom/news/reversinglabs-yara-rule-detects-badrabbit-encryption-routine-specifics.html" info = "ReversingLabs' YARA rule detects BadRabbit encryption routine specifics." malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.eternal_petya" malpedia_version = "20171222" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $encrypt_file = { 55 8B EC 83 EC ?? 53 56 57 8B 7D ?? 8B 4F ?? 33 DB 8D 45 ?? 50 53 53 51 89 5D ?? 89 5D ?? 89 5D ?? FF 15 ?? ?? ?? ?? 85 C0 0F 84 ?? ?? ?? ?? 8B 55 ?? 53 53 6A ?? 53 53 68 ?? ?? ?? ?? 52 FF 15 ?? ?? ?? ?? 8B F0 83 FE ?? 0F 84 ?? ?? ?? ?? 8D 45 ?? 50 8D 4D ?? 51 57 8B CE E8 ?? ?? ?? ?? 83 C4 ?? 85 C0 0F 84 ?? ?? ?? ?? 39 5D ?? 0F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?? 8B 44 24 ?? A8 ?? 74 ?? A9 ?? ?? ?? ?? 75 ?? 8D BC 24 ?? ?? ?? ?? E8 ?? ?? ?? ?? 85 C0 75 ?? 8B 45 ?? 53 48 50 8B CF 51 E8 ?? ?? ?? ?? 83 C4 ?? EB ?? 8D 54 24 ?? 52 FF 15 ?? ?? ?? ?? 8D 4C 24 ?? 8D 71 ?? 90 66 8B 11 83 C1 ?? 66 85 D2 75 ?? 2B CE D1 F9 8D 4C 4C ?? 3B C1 74 ?? 50 E8 ?? ?? ?? ?? 83 C4 ?? 85 C0 74 ?? 8D 94 24 ?? ?? ?? ?? 53 52 E8 ?? ?? ?? ?? 83 C4 ?? 8B 74 24 ?? 8D 44 24 ?? 50 56 FF 15 ?? ?? ?? ?? 85 C0 0F 85 ?? ?? ?? ??} condition: $encrypt_file and $main_encrypt and $encryption_loop }
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