rule win_qhost_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.qhost."
        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.qhost"
        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 = { 68???????? e8???????? 83c408 85c0 7415 8b4508 }
            // n = 6, score = 100
            //   68????????           |                     
            //   e8????????           |                     
            //   83c408               | add                 esp, 8
            //   85c0                 | test                eax, eax
            //   7415                 | je                  0x17
            //   8b4508               | mov                 eax, dword ptr [ebp + 8]

        $sequence_1 = { 8d55f8 52 6a23 ff55fc 85c0 751f }
            // n = 6, score = 100
            //   8d55f8               | lea                 edx, [ebp - 8]
            //   52                   | push                edx
            //   6a23                 | push                0x23
            //   ff55fc               | call                dword ptr [ebp - 4]
            //   85c0                 | test                eax, eax
            //   751f                 | jne                 0x21

        $sequence_2 = { e8???????? 83c40c 8b9558ffffff 52 8b8554ffffff 50 }
            // n = 6, score = 100
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   8b9558ffffff         | mov                 edx, dword ptr [ebp - 0xa8]
            //   52                   | push                edx
            //   8b8554ffffff         | mov                 eax, dword ptr [ebp - 0xac]
            //   50                   | push                eax

        $sequence_3 = { 837df800 741e 8b45fc 50 68???????? 68???????? }
            // n = 6, score = 100
            //   837df800             | cmp                 dword ptr [ebp - 8], 0
            //   741e                 | je                  0x20
            //   8b45fc               | mov                 eax, dword ptr [ebp - 4]
            //   50                   | push                eax
            //   68????????           |                     
            //   68????????           |                     

        $sequence_4 = { 83c404 50 8b9578ffffff 52 e8???????? }
            // n = 5, score = 100
            //   83c404               | add                 esp, 4
            //   50                   | push                eax
            //   8b9578ffffff         | mov                 edx, dword ptr [ebp - 0x88]
            //   52                   | push                edx
            //   e8????????           |                     

        $sequence_5 = { 68???????? 6a00 ff15???????? e9???????? 8b5598 81e2ff000000 }
            // n = 6, score = 100
            //   68????????           |                     
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   e9????????           |                     
            //   8b5598               | mov                 edx, dword ptr [ebp - 0x68]
            //   81e2ff000000         | and                 edx, 0xff

        $sequence_6 = { 83f901 7412 68???????? e8???????? 83c404 e9???????? 83bd68ffffff06 }
            // n = 7, score = 100
            //   83f901               | cmp                 ecx, 1
            //   7412                 | je                  0x14
            //   68????????           |                     
            //   e8????????           |                     
            //   83c404               | add                 esp, 4
            //   e9????????           |                     
            //   83bd68ffffff06       | cmp                 dword ptr [ebp - 0x98], 6

        $sequence_7 = { 8d45a8 50 6a00 ff15???????? 83c408 898578ffffff }
            // n = 6, score = 100
            //   8d45a8               | lea                 eax, [ebp - 0x58]
            //   50                   | push                eax
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   83c408               | add                 esp, 8
            //   898578ffffff         | mov                 dword ptr [ebp - 0x88], eax

        $sequence_8 = { 8808 8b95b4fbffff 83c201 8995b4fbffff }
            // n = 4, score = 100
            //   8808                 | mov                 byte ptr [eax], cl
            //   8b95b4fbffff         | mov                 edx, dword ptr [ebp - 0x44c]
            //   83c201               | add                 edx, 1
            //   8995b4fbffff         | mov                 dword ptr [ebp - 0x44c], edx

        $sequence_9 = { 8d95f4fcffff 52 e8???????? 83c40c 68???????? e8???????? 83c404 }
            // n = 7, score = 100
            //   8d95f4fcffff         | lea                 edx, [ebp - 0x30c]
            //   52                   | push                edx
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   68????????           |                     
            //   e8????????           |                     
            //   83c404               | add                 esp, 4

    condition:
        7 of them and filesize < 286720
}