rule win_8t_dropper_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.8t_dropper."
        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.8t_dropper"
        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 = { bf???????? 83c9ff f2ae f7d1 49 c6440c0c52 }
            // n = 6, score = 200
            //   bf????????           |                     
            //   83c9ff               | or                  ecx, 0xffffffff
            //   f2ae                 | repne scasb         al, byte ptr es:[edi]
            //   f7d1                 | not                 ecx
            //   49                   | dec                 ecx
            //   c6440c0c52           | mov                 byte ptr [esp + ecx + 0xc], 0x52

        $sequence_1 = { f2ae f7d1 49 c6440c0c52 }
            // n = 4, score = 200
            //   f2ae                 | repne scasb         al, byte ptr es:[edi]
            //   f7d1                 | not                 ecx
            //   49                   | dec                 ecx
            //   c6440c0c52           | mov                 byte ptr [esp + ecx + 0xc], 0x52

        $sequence_2 = { 51 68???????? 6a02 50 8b442418 }
            // n = 5, score = 200
            //   51                   | push                ecx
            //   68????????           |                     
            //   6a02                 | push                2
            //   50                   | push                eax
            //   8b442418             | mov                 eax, dword ptr [esp + 0x18]

        $sequence_3 = { 33c0 8d7c240d c644240c00 f3ab 66ab aa bf???????? }
            // n = 7, score = 200
            //   33c0                 | xor                 eax, eax
            //   8d7c240d             | lea                 edi, [esp + 0xd]
            //   c644240c00           | mov                 byte ptr [esp + 0xc], 0
            //   f3ab                 | rep stosd           dword ptr es:[edi], eax
            //   66ab                 | stosw               word ptr es:[edi], ax
            //   aa                   | stosb               byte ptr es:[edi], al
            //   bf????????           |                     

        $sequence_4 = { f7d1 49 c6440c0c52 c6440c0d75 c6440c0e6e }
            // n = 5, score = 200
            //   f7d1                 | not                 ecx
            //   49                   | dec                 ecx
            //   c6440c0c52           | mov                 byte ptr [esp + ecx + 0xc], 0x52
            //   c6440c0d75           | mov                 byte ptr [esp + ecx + 0xd], 0x75
            //   c6440c0e6e           | mov                 byte ptr [esp + ecx + 0xe], 0x6e

        $sequence_5 = { 50 ff15???????? 85c0 7559 8b4c2408 }
            // n = 5, score = 200
            //   50                   | push                eax
            //   ff15????????         |                     
            //   85c0                 | test                eax, eax
            //   7559                 | jne                 0x5b
            //   8b4c2408             | mov                 ecx, dword ptr [esp + 8]

        $sequence_6 = { 741b 56 6800700000 6a01 }
            // n = 4, score = 200
            //   741b                 | je                  0x1d
            //   56                   | push                esi
            //   6800700000           | push                0x7000
            //   6a01                 | push                1

        $sequence_7 = { 51 ff15???????? 8d942410010000 6804010000 52 68???????? }
            // n = 6, score = 200
            //   51                   | push                ecx
            //   ff15????????         |                     
            //   8d942410010000       | lea                 edx, [esp + 0x110]
            //   6804010000           | push                0x104
            //   52                   | push                edx
            //   68????????           |                     

        $sequence_8 = { 7559 8b4c2408 51 ff15???????? 8d942410010000 6804010000 }
            // n = 6, score = 200
            //   7559                 | jne                 0x5b
            //   8b4c2408             | mov                 ecx, dword ptr [esp + 8]
            //   51                   | push                ecx
            //   ff15????????         |                     
            //   8d942410010000       | lea                 edx, [esp + 0x110]
            //   6804010000           | push                0x104

        $sequence_9 = { ff15???????? 8d942410010000 6804010000 52 }
            // n = 4, score = 200
            //   ff15????????         |                     
            //   8d942410010000       | lea                 edx, [esp + 0x110]
            //   6804010000           | push                0x104
            //   52                   | push                edx

    condition:
        7 of them and filesize < 147456
}