rule win_kurton_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.kurton."
        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.kurton"
        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 = { 8bf0 8dbc2420010000 f3a5 50 }
            // n = 4, score = 100
            //   8bf0                 | mov                 esi, eax
            //   8dbc2420010000       | lea                 edi, [esp + 0x120]
            //   f3a5                 | rep movsd           dword ptr es:[edi], dword ptr [esi]
            //   50                   | push                eax

        $sequence_1 = { 53 50 8d4e10 e8???????? 8b0d???????? 8d54242c }
            // n = 6, score = 100
            //   53                   | push                ebx
            //   50                   | push                eax
            //   8d4e10               | lea                 ecx, [esi + 0x10]
            //   e8????????           |                     
            //   8b0d????????         |                     
            //   8d54242c             | lea                 edx, [esp + 0x2c]

        $sequence_2 = { 8d4e70 52 c744241400000000 aa e8???????? 8d442410 }
            // n = 6, score = 100
            //   8d4e70               | lea                 ecx, [esi + 0x70]
            //   52                   | push                edx
            //   c744241400000000     | mov                 dword ptr [esp + 0x14], 0
            //   aa                   | stosb               byte ptr es:[edi], al
            //   e8????????           |                     
            //   8d442410             | lea                 eax, [esp + 0x10]

        $sequence_3 = { 8a4c2413 8d7e20 896c2424 880f 896f04 896f08 }
            // n = 6, score = 100
            //   8a4c2413             | mov                 cl, byte ptr [esp + 0x13]
            //   8d7e20               | lea                 edi, [esi + 0x20]
            //   896c2424             | mov                 dword ptr [esp + 0x24], ebp
            //   880f                 | mov                 byte ptr [edi], cl
            //   896f04               | mov                 dword ptr [edi + 4], ebp
            //   896f08               | mov                 dword ptr [edi + 8], ebp

        $sequence_4 = { 5b 64890d00000000 81c4c4000000 c3 83ec14 53 56 }
            // n = 7, score = 100
            //   5b                   | pop                 ebx
            //   64890d00000000       | mov                 dword ptr fs:[0], ecx
            //   81c4c4000000         | add                 esp, 0xc4
            //   c3                   | ret                 
            //   83ec14               | sub                 esp, 0x14
            //   53                   | push                ebx
            //   56                   | push                esi

        $sequence_5 = { 8d4c242c 50 57 e8???????? 68???????? e8???????? 83c404 }
            // n = 7, score = 100
            //   8d4c242c             | lea                 ecx, [esp + 0x2c]
            //   50                   | push                eax
            //   57                   | push                edi
            //   e8????????           |                     
            //   68????????           |                     
            //   e8????????           |                     
            //   83c404               | add                 esp, 4

        $sequence_6 = { e8???????? 85c0 741e 8b44241c 53 6a00 68???????? }
            // n = 7, score = 100
            //   e8????????           |                     
            //   85c0                 | test                eax, eax
            //   741e                 | je                  0x20
            //   8b44241c             | mov                 eax, dword ptr [esp + 0x1c]
            //   53                   | push                ebx
            //   6a00                 | push                0
            //   68????????           |                     

        $sequence_7 = { 8b45fc 02d3 885104 99 }
            // n = 4, score = 100
            //   8b45fc               | mov                 eax, dword ptr [ebp - 4]
            //   02d3                 | add                 dl, bl
            //   885104               | mov                 byte ptr [ecx + 4], dl
            //   99                   | cdq                 

        $sequence_8 = { e8???????? 68???????? 68???????? 8d4c2414 c78424ac02000000000000 e8???????? 84c0 }
            // n = 7, score = 100
            //   e8????????           |                     
            //   68????????           |                     
            //   68????????           |                     
            //   8d4c2414             | lea                 ecx, [esp + 0x14]
            //   c78424ac02000000000000     | mov    dword ptr [esp + 0x2ac], 0
            //   e8????????           |                     
            //   84c0                 | test                al, al

        $sequence_9 = { 8be9 57 33db b918000000 33c0 }
            // n = 5, score = 100
            //   8be9                 | mov                 ebp, ecx
            //   57                   | push                edi
            //   33db                 | xor                 ebx, ebx
            //   b918000000           | mov                 ecx, 0x18
            //   33c0                 | xor                 eax, eax

    condition:
        7 of them and filesize < 344064
}