rule win_killav_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.killav."
        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.killav"
        malpedia_rule_date = "20260916"
        malpedia_hash = "53a643781c18e08f4a50949af60172d837a0b6f6"
        malpedia_version = "20260917"
        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 = { c745ec07000000 668945d8 e8???????? 8d45d8 c645fc36 50 8d4dd0 }
            // n = 7, score = 200
            //   c745ec07000000       | mov                 dword ptr [ebp - 0x14], 7
            //   668945d8             | mov                 word ptr [ebp - 0x28], ax
            //   e8????????           |                     
            //   8d45d8               | lea                 eax, [ebp - 0x28]
            //   c645fc36             | mov                 byte ptr [ebp - 4], 0x36
            //   50                   | push                eax
            //   8d4dd0               | lea                 ecx, [ebp - 0x30]

        $sequence_1 = { ff34f518054300 ff7508 e8???????? 83c40c 85c0 7413 7905 }
            // n = 7, score = 200
            //   ff34f518054300       | push                dword ptr [esi*8 + 0x430518]
            //   ff7508               | push                dword ptr [ebp + 8]
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   85c0                 | test                eax, eax
            //   7413                 | je                  0x15
            //   7905                 | jns                 7

        $sequence_2 = { c745ec07000000 668945d8 e8???????? 8d45d8 c645fc1a }
            // n = 5, score = 200
            //   c745ec07000000       | mov                 dword ptr [ebp - 0x14], 7
            //   668945d8             | mov                 word ptr [ebp - 0x28], ax
            //   e8????????           |                     
            //   8d45d8               | lea                 eax, [ebp - 0x28]
            //   c645fc1a             | mov                 byte ptr [ebp - 4], 0x1a

        $sequence_3 = { 41 eb0c 0fb6c0 0fbe80e0a24300 03c8 83c601 83d200 }
            // n = 7, score = 200
            //   41                   | inc                 ecx
            //   eb0c                 | jmp                 0xe
            //   0fb6c0               | movzx               eax, al
            //   0fbe80e0a24300       | movsx               eax, byte ptr [eax + 0x43a2e0]
            //   03c8                 | add                 ecx, eax
            //   83c601               | add                 esi, 1
            //   83d200               | adc                 edx, 0

        $sequence_4 = { 83f81d 7cf1 eb07 8b0cc5fce14200 894de4 85c9 }
            // n = 6, score = 200
            //   83f81d               | cmp                 eax, 0x1d
            //   7cf1                 | jl                  0xfffffff3
            //   eb07                 | jmp                 9
            //   8b0cc5fce14200       | mov                 ecx, dword ptr [eax*8 + 0x42e1fc]
            //   894de4               | mov                 dword ptr [ebp - 0x1c], ecx
            //   85c9                 | test                ecx, ecx

        $sequence_5 = { 8b45f8 49 894df4 8b4df0 6a03 8b048570ba4300 8955ec }
            // n = 7, score = 200
            //   8b45f8               | mov                 eax, dword ptr [ebp - 8]
            //   49                   | dec                 ecx
            //   894df4               | mov                 dword ptr [ebp - 0xc], ecx
            //   8b4df0               | mov                 ecx, dword ptr [ebp - 0x10]
            //   6a03                 | push                3
            //   8b048570ba4300       | mov                 eax, dword ptr [eax*4 + 0x43ba70]
            //   8955ec               | mov                 dword ptr [ebp - 0x14], edx

        $sequence_6 = { 8b45f0 c70300000000 c70700000000 c70600000000 c7405c00000000 894850 895054 }
            // n = 7, score = 200
            //   8b45f0               | mov                 eax, dword ptr [ebp - 0x10]
            //   c70300000000         | mov                 dword ptr [ebx], 0
            //   c70700000000         | mov                 dword ptr [edi], 0
            //   c70600000000         | mov                 dword ptr [esi], 0
            //   c7405c00000000       | mov                 dword ptr [eax + 0x5c], 0
            //   894850               | mov                 dword ptr [eax + 0x50], ecx
            //   895054               | mov                 dword ptr [eax + 0x54], edx

        $sequence_7 = { 8b0c8d70ba4300 80643128fd 5f 5e c9 c3 }
            // n = 6, score = 200
            //   8b0c8d70ba4300       | mov                 ecx, dword ptr [ecx*4 + 0x43ba70]
            //   80643128fd           | and                 byte ptr [ecx + esi + 0x28], 0xfd
            //   5f                   | pop                 edi
            //   5e                   | pop                 esi
            //   c9                   | leave               
            //   c3                   | ret                 

        $sequence_8 = { 43 33ff 8b048570ba4300 8945e4 897dfc 894de8 8a440129 }
            // n = 7, score = 200
            //   43                   | inc                 ebx
            //   33ff                 | xor                 edi, edi
            //   8b048570ba4300       | mov                 eax, dword ptr [eax*4 + 0x43ba70]
            //   8945e4               | mov                 dword ptr [ebp - 0x1c], eax
            //   897dfc               | mov                 dword ptr [ebp - 4], edi
            //   894de8               | mov                 dword ptr [ebp - 0x18], ecx
            //   8a440129             | mov                 al, byte ptr [ecx + eax + 0x29]

        $sequence_9 = { 6a00 6a04 8d842460020000 50 }
            // n = 4, score = 200
            //   6a00                 | push                0
            //   6a04                 | push                4
            //   8d842460020000       | lea                 eax, [esp + 0x260]
            //   50                   | push                eax

    condition:
        7 of them and filesize < 517120
}