rule win_voldemort_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.voldemort."
        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.voldemort"
        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 = { 8bc3 4883c420 5b c3 4c8bda 4c8bd1 450fb702 }
            // n = 7, score = 300
            //   8bc3                 | dec                 eax
            //   4883c420             | mov                 ecx, ebx
            //   5b                   | dec                 eax
            //   c3                   | test                eax, eax
            //   4c8bda               | je                  0x693
            //   4c8bd1               | mov                 ecx, 0x16
            //   450fb702             | rep movsb           byte ptr es:[edi], byte ptr [esi]

        $sequence_1 = { 0f45c7 4803c1 48894308 e9???????? 48895c2408 57 }
            // n = 6, score = 300
            //   0f45c7               | dec                 eax
            //   4803c1               | lea                 ecx, [0x36084]
            //   48894308             | dec                 eax
            //   e9????????           |                     
            //   48895c2408           | mov                 ecx, ebx
            //   57                   | dec                 eax

        $sequence_2 = { 488b5c2408 418ac0 c3 488bc4 }
            // n = 4, score = 300
            //   488b5c2408           | je                  0x8da
            //   418ac0               | mov                 eax, 6
            //   c3                   | jmp                 0x94b
            //   488bc4               | dec                 eax

        $sequence_3 = { 66833925 8d78fe 0f45c7 4803c1 48894308 e9???????? 48895c2408 }
            // n = 7, score = 300
            //   66833925             | xor                 eax, eax
            //   8d78fe               | jne                 0x607
            //   0f45c7               | dec                 eax
            //   4803c1               | lea                 eax, [0x1aa26]
            //   48894308             | dec                 eax
            //   e9????????           |                     
            //   48895c2408           | cmp                 ecx, eax

        $sequence_4 = { 488b5c2408 418ac0 c3 488bc4 48895808 48896810 }
            // n = 6, score = 300
            //   488b5c2408           | mov                 word ptr [esp], ax
            //   418ac0               | dec                 eax
            //   c3                   | mov                 eax, dword ptr [esp + 0x28]
            //   488bc4               | dec                 eax
            //   48895808             | mov                 ecx, dword ptr [esp + 0x38]
            //   48896810             | movzx               edx, word ptr [esp]

        $sequence_5 = { 7597 41b001 488b5c2408 418ac0 c3 488bc4 }
            // n = 6, score = 300
            //   7597                 | movaps              xmm1, xmm0
            //   41b001               | dec                 eax
            //   488b5c2408           | cmp                 eax, ecx
            //   418ac0               | je                  0x68
            //   c3                   | movsd               qword ptr [edi + 0x30], xmm0
            //   488bc4               | jb                  0x27

        $sequence_6 = { 415c 5f c3 4c8bdc 49895b18 57 4883ec40 }
            // n = 7, score = 300
            //   415c                 | dec                 eax
            //   5f                   | lea                 ebx, [eax + eax]
            //   c3                   | dec                 esp
            //   4c8bdc               | mov                 eax, ebx
            //   49895b18             | mov                 edx, 8
            //   57                   | dec                 eax
            //   4883ec40             | mov                 ecx, eax

        $sequence_7 = { 48894308 e9???????? 48895c2408 57 4883ec20 }
            // n = 5, score = 300
            //   48894308             | inc                 ecx
            //   e9????????           |                     
            //   48895c2408           | mov                 eax, 0x28
            //   57                   | dec                 eax
            //   4883ec20             | mov                 ecx, eax

        $sequence_8 = { 4803c1 48894308 e9???????? 48895c2408 57 4883ec20 }
            // n = 6, score = 300
            //   4803c1               | dec                 eax
            //   48894308             | lea                 eax, [ebp + 0x240]
            //   e9????????           |                     
            //   48895c2408           | dec                 eax
            //   57                   | mov                 ebx, 0xffffffff
            //   4883ec20             | dec                 eax

        $sequence_9 = { 4803c1 48894308 e9???????? 48895c2408 57 }
            // n = 5, score = 300
            //   4803c1               | dec                 eax
            //   48894308             | mov                 eax, dword ptr [esp + 0x28]
            //   e9????????           |                     
            //   48895c2408           | inc                 esp
            //   57                   | mov                 eax, eax

    condition:
        7 of them and filesize < 577536
}