rule win_aurastealer_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.aurastealer."
        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.aurastealer"
        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 = { 0f95c0 0fb6c0 c1e006 0d80780000 }
            // n = 4, score = 1700
            //   0f95c0               | setne               al
            //   0fb6c0               | movzx               eax, al
            //   c1e006               | shl                 eax, 6
            //   0d80780000           | or                  eax, 0x7880

        $sequence_1 = { 01f0 b900000080 89c2 09ca 31c1 }
            // n = 5, score = 1700
            //   01f0                 | add                 eax, esi
            //   b900000080           | mov                 ecx, 0x80000000
            //   89c2                 | mov                 edx, eax
            //   09ca                 | or                  edx, ecx
            //   31c1                 | xor                 ecx, eax

        $sequence_2 = { 7507 b80a000000 eb15 83e010 83f801 }
            // n = 5, score = 1700
            //   7507                 | jne                 9
            //   b80a000000           | mov                 eax, 0xa
            //   eb15                 | jmp                 0x17
            //   83e010               | and                 eax, 0x10
            //   83f801               | cmp                 eax, 1

        $sequence_3 = { 0f114140 0f114130 0f114120 0f114110 0f1101 e8???????? }
            // n = 6, score = 1700
            //   0f114140             | movups              xmmword ptr [ecx + 0x40], xmm0
            //   0f114130             | movups              xmmword ptr [ecx + 0x30], xmm0
            //   0f114120             | movups              xmmword ptr [ecx + 0x20], xmm0
            //   0f114110             | movups              xmmword ptr [ecx + 0x10], xmm0
            //   0f1101               | movups              xmmword ptr [ecx], xmm0
            //   e8????????           |                     

        $sequence_4 = { 09ca 31c1 85c0 0f49ca 89c8 }
            // n = 5, score = 1700
            //   09ca                 | or                  edx, ecx
            //   31c1                 | xor                 ecx, eax
            //   85c0                 | test                eax, eax
            //   0f49ca               | cmovns              ecx, edx
            //   89c8                 | mov                 eax, ecx

        $sequence_5 = { 81fa0c0000a0 741f 81fa030000a0 7507 b80a000000 }
            // n = 5, score = 1700
            //   81fa0c0000a0         | cmp                 edx, 0xa000000c
            //   741f                 | je                  0x21
            //   81fa030000a0         | cmp                 edx, 0xa0000003
            //   7507                 | jne                 9
            //   b80a000000           | mov                 eax, 0xa

        $sequence_6 = { 31c0 80f92f 0f95c0 c3 }
            // n = 4, score = 1700
            //   31c0                 | xor                 eax, eax
            //   80f92f               | cmp                 cl, 0x2f
            //   0f95c0               | setne               al
            //   c3                   | ret                 

        $sequence_7 = { 80cb80 e9???????? b308 e9???????? }
            // n = 4, score = 1700
            //   80cb80               | or                  bl, 0x80
            //   e9????????           |                     
            //   b308                 | mov                 bl, 8
            //   e9????????           |                     

        $sequence_8 = { 01442428 8bf1 13d9 33d2 }
            // n = 4, score = 100
            //   01442428             | add                 dword ptr [esp + 0x28], eax
            //   8bf1                 | mov                 esi, ecx
            //   13d9                 | adc                 ebx, ecx
            //   33d2                 | xor                 edx, edx

        $sequence_9 = { 012c18 42 3bd7 72dc }
            // n = 4, score = 100
            //   012c18               | add                 dword ptr [eax + ebx], ebp
            //   42                   | inc                 edx
            //   3bd7                 | cmp                 edx, edi
            //   72dc                 | jb                  0xffffffde

        $sequence_10 = { 01442420 13d1 c1eb0b 0fa4c115 }
            // n = 4, score = 100
            //   01442420             | add                 dword ptr [esp + 0x20], eax
            //   13d1                 | adc                 edx, ecx
            //   c1eb0b               | shr                 ebx, 0xb
            //   0fa4c115             | shld                ecx, eax, 0x15

        $sequence_11 = { 014c241c 13f0 33d2 89742420 }
            // n = 4, score = 100
            //   014c241c             | add                 dword ptr [esp + 0x1c], ecx
            //   13f0                 | adc                 esi, eax
            //   33d2                 | xor                 edx, edx
            //   89742420             | mov                 dword ptr [esp + 0x20], esi

        $sequence_12 = { 014c2420 8be8 13f0 33ff }
            // n = 4, score = 100
            //   014c2420             | add                 dword ptr [esp + 0x20], ecx
            //   8be8                 | mov                 ebp, eax
            //   13f0                 | adc                 esi, eax
            //   33ff                 | xor                 edi, edi

        $sequence_13 = { 0144241c 8b7c2424 136c2414 33c0 }
            // n = 4, score = 100
            //   0144241c             | add                 dword ptr [esp + 0x1c], eax
            //   8b7c2424             | mov                 edi, dword ptr [esp + 0x24]
            //   136c2414             | adc                 ebp, dword ptr [esp + 0x14]
            //   33c0                 | xor                 eax, eax

        $sequence_14 = { 0128 42 3bd7 72db }
            // n = 4, score = 100
            //   0128                 | add                 dword ptr [eax], ebp
            //   42                   | inc                 edx
            //   3bd7                 | cmp                 edx, edi
            //   72db                 | jb                  0xffffffdd

        $sequence_15 = { 0002 8a0c0f 83c40c 020e }
            // n = 4, score = 100
            //   0002                 | add                 byte ptr [edx], al
            //   8a0c0f               | mov                 cl, byte ptr [edi + ecx]
            //   83c40c               | add                 esp, 0xc
            //   020e                 | add                 cl, byte ptr [esi]

    condition:
        7 of them and filesize < 20267008
}