rule win_supper_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.supper."
        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.supper"
        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 = { 53 4883ec38 48833d????????00 7474 }
            // n = 4, score = 1700
            //   53                   | mov                 ecx, dword ptr [ebx + 8]
            //   4883ec38             | mov                 edx, 1
            //   48833d????????00     |                     
            //   7474                 | inc                 ecx

        $sequence_1 = { 4889c1 488905???????? e8???????? 84c0 7407 }
            // n = 5, score = 1700
            //   4889c1               | add                 esp, 0x28
            //   488905????????       |                     
            //   e8????????           |                     
            //   84c0                 | pop                 ebx
            //   7407                 | pop                 esi

        $sequence_2 = { e8???????? 48c705????????00000000 b9d0070000 ff15???????? b938000000 e8???????? 4889c1 }
            // n = 7, score = 1700
            //   e8????????           |                     
            //   48c705????????00000000     |     
            //   b9d0070000           | mov                 ecx, 0x7d0
            //   ff15????????         |                     
            //   b938000000           | mov                 ecx, 0x38
            //   e8????????           |                     
            //   4889c1               | dec                 eax

        $sequence_3 = { b9d0070000 4883c428 5b 5e }
            // n = 4, score = 1700
            //   b9d0070000           | mov                 eax, dword ptr [eax + 8]
            //   4883c428             | dec                 eax
            //   5b                   | test                eax, eax
            //   5e                   | je                  0x12

        $sequence_4 = { 4885c0 7416 488b4008 4885c0 740d }
            // n = 5, score = 1700
            //   4885c0               | mov                 ecx, eax
            //   7416                 | dec                 eax
            //   488b4008             | test                eax, eax
            //   4885c0               | je                  0x1b
            //   740d                 | dec                 eax

        $sequence_5 = { 4531c0 488b4b08 ba01000000 41ffd4 }
            // n = 4, score = 1700
            //   4531c0               | call                esi
            //   488b4b08             | xor                 eax, eax
            //   ba01000000           | dec                 eax
            //   41ffd4               | mov                 ecx, eax

        $sequence_6 = { 4883c438 5b 5e c3 488b0d???????? 4885c9 }
            // n = 6, score = 1700
            //   4883c438             | call                esp
            //   5b                   | dec                 eax
            //   5e                   | mov                 eax, dword ptr [esi + ebx*8]
            //   c3                   | dec                 eax
            //   488b0d????????       |                     
            //   4885c9               | test                eax, eax

        $sequence_7 = { ffd6 48891d???????? 488905???????? 31c0 }
            // n = 4, score = 1700
            //   ffd6                 | mov                 ecx, 0x7d0
            //   48891d????????       |                     
            //   488905????????       |                     
            //   31c0                 | dec                 eax

        $sequence_8 = { 83f001 84c0 7425 48837df0ff 7414 488b45f0 4889c1 }
            // n = 7, score = 300
            //   83f001               | xor                 eax, eax
            //   84c0                 | xor                 edx, edx
            //   7425                 | xor                 ecx, ecx
            //   48837df0ff           | mov                 edx, 0xffffffff
            //   7414                 | cmp                 bx, 0x3fff
            //   488b45f0             | je                  9
            //   4889c1               | mov                 ecx, ebx

        $sequence_9 = { ba00000000 b900000000 e8???????? 85c0 7f07 }
            // n = 5, score = 300
            //   ba00000000           | pop                 ebx
            //   b900000000           | dec                 eax
            //   e8????????           |                     
            //   85c0                 | mov                 eax, dword ptr [eax + 8]
            //   7f07                 | dec                 eax

        $sequence_10 = { ba80000000 4889c1 e8???????? 85c0 0f85e0000000 }
            // n = 5, score = 300
            //   ba80000000           | mov                 ecx, dword ptr [ebx + 8]
            //   4889c1               | mov                 edx, 1
            //   e8????????           |                     
            //   85c0                 | inc                 ecx
            //   0f85e0000000         | call                esp

        $sequence_11 = { b801000000 e9???????? c745ac01000000 488d55ac }
            // n = 4, score = 300
            //   b801000000           | dec                 eax
            //   e9????????           |                     
            //   c745ac01000000       | add                 esp, 0x28
            //   488d55ac             | pop                 ebx

        $sequence_12 = { 0fb645ff 4883c438 5b 5d c3 }
            // n = 5, score = 300
            //   0fb645ff             | test                ecx, ecx
            //   4883c438             | je                  0x23
            //   5b                   | inc                 ebp
            //   5d                   | xor                 eax, eax
            //   c3                   | dec                 eax

        $sequence_13 = { eb31 c745f02c010000 c745f400000000 488b05???????? 4c8d45f0 8b4d18 488b5510 }
            // n = 7, score = 300
            //   eb31                 | pop                 esi
            //   c745f02c010000       | dec                 eax
            //   c745f400000000       | mov                 ebx, ecx
            //   488b05????????       |                     
            //   4c8d45f0             | xor                 ecx, ecx
            //   8b4d18               | call                esi
            //   488b5510             | inc                 ebp

        $sequence_14 = { c785ec00000009000000 eb5e 83bde400000002 750c c785ec00000008000000 }
            // n = 5, score = 300
            //   c785ec00000009000000     | test    eax, eax
            //   eb5e                 | je                  0xf
            //   83bde400000002       | dec                 eax
            //   750c                 | cmp                 dword ptr [eax], 0
            //   c785ec00000008000000     | mov    ecx, 0x7d0

        $sequence_15 = { 488b85e8000000 8b00 89c0 48c1e002 }
            // n = 4, score = 300
            //   488b85e8000000       | test                al, al
            //   8b00                 | je                  0xb
            //   89c0                 | dec                 eax
            //   48c1e002             | add                 esp, 0x38

    condition:
        7 of them and filesize < 517120
}