rule win_attor_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.attor."
        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.attor"
        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 = { 83f801 7411 3d81000000 740a }
            // n = 4, score = 400
            //   83f801               | cmp                 eax, 1
            //   7411                 | je                  0x13
            //   3d81000000           | cmp                 eax, 0x81
            //   740a                 | je                  0xc

        $sequence_1 = { e9???????? 33c0 488bcf 488907 48894708 48894710 48894718 }
            // n = 7, score = 300
            //   e9????????           |                     
            //   33c0                 | add                 esi, 8
            //   488bcf               | dec                 ecx
            //   488907               | mov                 ecx, esi
            //   48894708             | xor                 eax, eax
            //   48894710             | dec                 eax
            //   48894718             | mov                 ecx, edi

        $sequence_2 = { 33c9 e8???????? 488b8c2480000000 e8???????? eb05 }
            // n = 5, score = 300
            //   33c9                 | jmp                 0x62
            //   e8????????           |                     
            //   488b8c2480000000     | dec                 eax
            //   e8????????           |                     
            //   eb05                 | mov                 ecx, dword ptr [esp + 0xa0]

        $sequence_3 = { 7404 41895d00 418ac4 4883c460 }
            // n = 4, score = 300
            //   7404                 | je                  0x3c
            //   41895d00             | inc                 ecx
            //   418ac4               | mov                 byte ptr [ebx], dh
            //   4883c460             | mov                 ebx, eax

        $sequence_4 = { 8bd8 eb5e 488b8c24a0000000 c70618000000 }
            // n = 4, score = 300
            //   8bd8                 | dec                 eax
            //   eb5e                 | mov                 dword ptr [edi + 0x10], eax
            //   488b8c24a0000000     | dec                 eax
            //   c70618000000         | mov                 dword ptr [edi + 0x18], eax

        $sequence_5 = { ff15???????? 85c0 7510 ff15???????? 4032ed 8bd8 }
            // n = 6, score = 300
            //   ff15????????         |                     
            //   85c0                 | dec                 esp
            //   7510                 | mov                 ebx, dword ptr [esp + 0x40]
            //   ff15????????         |                     
            //   4032ed               | dec                 ebp
            //   8bd8                 | test                ebx, ebx

        $sequence_6 = { 8bd8 e9???????? 4c8bb42498000000 4983c608 498bce e8???????? }
            // n = 6, score = 300
            //   8bd8                 | mov                 ebx, eax
            //   e9????????           |                     
            //   4c8bb42498000000     | dec                 esp
            //   4983c608             | mov                 esi, dword ptr [esp + 0x98]
            //   498bce               | dec                 ecx
            //   e8????????           |                     

        $sequence_7 = { e8???????? 4c8b5c2440 4d85db 743a 418833 }
            // n = 5, score = 300
            //   e8????????           |                     
            //   4c8b5c2440           | dec                 eax
            //   4d85db               | mov                 dword ptr [edi], eax
            //   743a                 | dec                 eax
            //   418833               | mov                 dword ptr [edi + 8], eax

        $sequence_8 = { 0f84b3020000 8d4c2420 897c2420 51 }
            // n = 4, score = 200
            //   0f84b3020000         | dec                 esp
            //   8d4c2420             | mov                 esi, dword ptr [esp + 0x58]
            //   897c2420             | dec                 ebp
            //   51                   | test                edi, edi

        $sequence_9 = { 57 e8???????? 8b4c241c 51 ffd6 83c408 }
            // n = 6, score = 200
            //   57                   | je                  0x14
            //   e8????????           |                     
            //   8b4c241c             | je                  0xc
            //   51                   | cmp                 eax, 8
            //   ffd6                 | je                  0xa
            //   83c408               | cmp                 eax, 0x11

        $sequence_10 = { c744241808000000 eb31 c744241857000000 eb27 }
            // n = 4, score = 200
            //   c744241808000000     | test                eax, eax
            //   eb31                 | je                  0x1ef
            //   c744241857000000     | lea                 ecx, [esp + 0x38]
            //   eb27                 | mov                 dword ptr [esp + 0x38], 0

        $sequence_11 = { 8b542420 52 50 8b442420 6a00 6a02 }
            // n = 6, score = 200
            //   8b542420             | test                eax, eax
            //   52                   | cmp                 eax, 1
            //   50                   | je                  0x13
            //   8b442420             | cmp                 eax, 0x81
            //   6a00                 | je                  0x13
            //   6a02                 | jne                 0x12

        $sequence_12 = { 6a02 50 ffd5 85c0 0f84e7010000 }
            // n = 5, score = 200
            //   6a02                 | inc                 eax
            //   50                   | xor                 ch, ch
            //   ffd5                 | mov                 ebx, eax
            //   85c0                 | dec                 ecx
            //   0f84e7010000         | mov                 ecx, esi

        $sequence_13 = { 740a 83f808 7405 83f811 }
            // n = 4, score = 200
            //   740a                 | dec                 eax
            //   83f808               | mov                 ecx, dword ptr [esp + 0x80]
            //   7405                 | inc                 ebp
            //   83f811               | xor                 eax, eax

        $sequence_14 = { 83c404 83e103 f3aa 8b442410 85c0 743d }
            // n = 6, score = 200
            //   83c404               | push                ecx
            //   83e103               | mov                 edx, dword ptr [esp + 0x20]
            //   f3aa                 | push                edx
            //   8b442410             | push                eax
            //   85c0                 | mov                 eax, dword ptr [esp + 0x20]
            //   743d                 | push                0

        $sequence_15 = { 85c0 0f84e7010000 8d4c2438 c744243800000000 51 }
            // n = 5, score = 200
            //   85c0                 | inc                 ecx
            //   0f84e7010000         | lea                 edx, [eax + 2]
            //   8d4c2438             | dec                 esp
            //   c744243800000000     | mov                 ecx, esi
            //   51                   | mov                 dword ptr [esp + 0x20], eax

    condition:
        7 of them and filesize < 2023424
}