rule win_net_star_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.net_star."
        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.net_star"
        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 = { 281f00000a 1106 281e00000a dc 1109 6f2500000a 1109 }
            // n = 7, score = 100
            //   281f00000a           | or                  ch, byte ptr [eax]
            //   1106                 | sldt                word ptr [eax]
            //   281e00000a           | or                  al, byte ptr [ebx]
            //   dc                   | jb                  0x22
            //   1109                 | add                 byte ptr [eax], al
            //   6f2500000a           | jo                  0x94
            //   1109                 | adc                 eax, 0x740a0000

        $sequence_1 = { 6f2400000a 6f2200000a de0f 1107 281f00000a }
            // n = 5, score = 100
            //   6f2400000a           | fimul               word ptr es:[ecx + 0x13]
            //   6f2200000a           | or                  dl, byte ptr [ecx]
            //   de0f                 | or                  dword ptr [edi + 0x21], ebp
            //   1107                 | add                 byte ptr [eax], al
            //   281f00000a           | or                  ch, byte ptr [eax]

        $sequence_2 = { 728d000070 2a 07 2802000006 1305 281a00000a }
            // n = 6, score = 100
            //   728d000070           | add                 byte ptr [esi], al
            //   2a                   | or                  eax, dword ptr [edi]
            //   07                   | jle                 0x10
            //   2802000006           | add                 byte ptr [eax], al
            //   1305                 | or                  ch, byte ptr [eax]
            //   281a00000a           | sldt                word ptr [eax]

        $sequence_3 = { 740100001b 0c 03 7243000070 6f1500000a }
            // n = 5, score = 100
            //   740100001b           | add                 byte ptr [eax], al
            //   0c                   | or                  ch, byte ptr [edi + 0x19]
            //   03                   | add                 byte ptr [eax], al
            //   7243000070           | or                  dl, byte ptr [ebx]
            //   6f1500000a           | add                 al, 0x11

        $sequence_4 = { 1308 1108 731d00000a 1309 1109 }
            // n = 5, score = 100
            //   1308                 | add                 dword ptr [eax], eax
            //   1108                 | add                 byte ptr [ebx], bl
            //   731d00000a           | or                  eax, dword ptr [edi]
            //   1309                 | jle                 0xe9
            //   1109                 | add                 byte ptr [eax], al

        $sequence_5 = { 09 281100000a 5a 281200000a 1304 08 09 }
            // n = 7, score = 100
            //   09                   | or                  dl, byte ptr [ebx]
            //   281100000a           | add                 al, 0x11
            //   5a                   | add                 al, 0x2b
            //   281200000a           | sbb                 eax, 0x11280907
            //   1304                 | add                 byte ptr [eax], al
            //   08                   | or                  bl, byte ptr [edx + 0x28]
            //   09                   | adc                 al, byte ptr [eax]

        $sequence_6 = { 08 09 1104 281300000a a2 09 }
            // n = 6, score = 100
            //   08                   | add                 esi, dword ptr [edx + 0x29]
            //   09                   | add                 byte ptr [eax], al
            //   1104                 | jo                  0x1e6
            //   281300000a           | adc                 eax, 0x6f0a0000
            //   a2                   | pop                 ss
            //   09                   | add                 byte ptr [eax], al

        $sequence_7 = { 6f1700000a 6f1500000a 740100001b 0d 09 2d06 725f000070 }
            // n = 7, score = 100
            //   6f1700000a           | add                 byte ptr [eax], al
            //   6f1500000a           | or                  dl, byte ptr [ebx]
            //   740100001b           | add                 al, 0x11
            //   0d                   | add                 al, 0x2d
            //   09                   | push                es
            //   2d06                 | jb                  0x59
            //   725f000070           | add                 byte ptr [eax], al

        $sequence_8 = { 09 08 8e 69 32dd 08 }
            // n = 6, score = 100
            //   09                   | or                  ch, byte ptr [edi + 0x21]
            //   08                   | add                 byte ptr [eax], al
            //   8e                   | or                  dl, byte ptr [ecx]
            //   69                   | or                  dword ptr [edx - 0x1b], esi
            //   32dd                 | add                 byte ptr [eax], al
            //   08                   | jo                  0x237

        $sequence_9 = { 26 de49 130a 1109 6f2100000a 1109 }
            // n = 6, score = 100
            //   26                   | add                 byte ptr [eax], al
            //   de49                 | or                  cl, byte ptr [eax]
            //   130a                 | outsd               dx, dword ptr [esi]
            //   1109                 | pop                 ss
            //   6f2100000a           | add                 byte ptr [eax], al
            //   1109                 | or                  ch, byte ptr [edi + 0x15]

    condition:
        7 of them and filesize < 50176
}