rule win_murofet_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.murofet."
        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.murofet"
        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 = { fec2 8816 e8???????? 0fb6c0 99 f7ff }
            // n = 6, score = 400
            //   fec2                 | inc                 dl
            //   8816                 | mov                 byte ptr [esi], dl
            //   e8????????           |                     
            //   0fb6c0               | movzx               eax, al
            //   99                   | cdq                 
            //   f7ff                 | idiv                edi

        $sequence_1 = { 3c04 73ce b002 a2???????? }
            // n = 4, score = 400
            //   3c04                 | cmp                 al, 4
            //   73ce                 | jae                 0xffffffd0
            //   b002                 | mov                 al, 2
            //   a2????????           |                     

        $sequence_2 = { e8???????? e8???????? 3c02 72e5 e8???????? a2???????? 84c0 }
            // n = 7, score = 400
            //   e8????????           |                     
            //   e8????????           |                     
            //   3c02                 | cmp                 al, 2
            //   72e5                 | jb                  0xffffffe7
            //   e8????????           |                     
            //   a2????????           |                     
            //   84c0                 | test                al, al

        $sequence_3 = { e8???????? 3c04 73ce b002 a2???????? }
            // n = 5, score = 400
            //   e8????????           |                     
            //   3c04                 | cmp                 al, 4
            //   73ce                 | jae                 0xffffffd0
            //   b002                 | mov                 al, 2
            //   a2????????           |                     

        $sequence_4 = { fec2 8816 e8???????? 0fb6c0 }
            // n = 4, score = 400
            //   fec2                 | inc                 dl
            //   8816                 | mov                 byte ptr [esi], dl
            //   e8????????           |                     
            //   0fb6c0               | movzx               eax, al

        $sequence_5 = { e8???????? 3c04 73ce b002 }
            // n = 4, score = 400
            //   e8????????           |                     
            //   3c04                 | cmp                 al, 4
            //   73ce                 | jae                 0xffffffd0
            //   b002                 | mov                 al, 2

        $sequence_6 = { 50 53 57 56 ff15???????? c6443eff00 }
            // n = 6, score = 400
            //   50                   | push                eax
            //   53                   | push                ebx
            //   57                   | push                edi
            //   56                   | push                esi
            //   ff15????????         |                     
            //   c6443eff00           | mov                 byte ptr [esi + edi - 1], 0

        $sequence_7 = { 3c02 72e5 e8???????? a2???????? 84c0 7510 }
            // n = 6, score = 400
            //   3c02                 | cmp                 al, 2
            //   72e5                 | jb                  0xffffffe7
            //   e8????????           |                     
            //   a2????????           |                     
            //   84c0                 | test                al, al
            //   7510                 | jne                 0x12

        $sequence_8 = { e8???????? 33c0 c20400 55 8bec 83ec68 53 }
            // n = 7, score = 400
            //   e8????????           |                     
            //   33c0                 | xor                 eax, eax
            //   c20400               | ret                 4
            //   55                   | push                ebp
            //   8bec                 | mov                 ebp, esp
            //   83ec68               | sub                 esp, 0x68
            //   53                   | push                ebx

        $sequence_9 = { a2???????? 84c0 7510 e8???????? }
            // n = 4, score = 400
            //   a2????????           |                     
            //   84c0                 | test                al, al
            //   7510                 | jne                 0x12
            //   e8????????           |                     

    condition:
        7 of them and filesize < 622592
}