rule win_fickerstealer_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.fickerstealer."
        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.fickerstealer"
        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 = { 56 83ec10 8b4d1c 8b4508 8b5d18 8b5514 f6c140 }
            // n = 7, score = 200
            //   56                   | push                esi
            //   83ec10               | sub                 esp, 0x10
            //   8b4d1c               | mov                 ecx, dword ptr [ebp + 0x1c]
            //   8b4508               | mov                 eax, dword ptr [ebp + 8]
            //   8b5d18               | mov                 ebx, dword ptr [ebp + 0x18]
            //   8b5514               | mov                 edx, dword ptr [ebp + 0x14]
            //   f6c140               | test                cl, 0x40

        $sequence_1 = { e8???????? 83c40c f20f10842480000000 f20f108c2488000000 8b442404 8b542410 89f9 }
            // n = 7, score = 200
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   f20f10842480000000     | movsd    xmm0, qword ptr [esp + 0x80]
            //   f20f108c2488000000     | movsd    xmm1, qword ptr [esp + 0x88]
            //   8b442404             | mov                 eax, dword ptr [esp + 4]
            //   8b542410             | mov                 edx, dword ptr [esp + 0x10]
            //   89f9                 | mov                 ecx, edi

        $sequence_2 = { c1e917 8d4181 83f81e 760d c1ea1f 81c2ffffff7f 89d0 }
            // n = 7, score = 200
            //   c1e917               | shr                 ecx, 0x17
            //   8d4181               | lea                 eax, [ecx - 0x7f]
            //   83f81e               | cmp                 eax, 0x1e
            //   760d                 | jbe                 0xf
            //   c1ea1f               | shr                 edx, 0x1f
            //   81c2ffffff7f         | add                 edx, 0x7fffffff
            //   89d0                 | mov                 eax, edx

        $sequence_3 = { f20f10842400010000 31ff 899424e4000000 89442410 8b842408010000 f20f1101 f20f1084240c010000 }
            // n = 7, score = 200
            //   f20f10842400010000     | movsd    xmm0, qword ptr [esp + 0x100]
            //   31ff                 | xor                 edi, edi
            //   899424e4000000       | mov                 dword ptr [esp + 0xe4], edx
            //   89442410             | mov                 dword ptr [esp + 0x10], eax
            //   8b842408010000       | mov                 eax, dword ptr [esp + 0x108]
            //   f20f1101             | movsd               qword ptr [ecx], xmm0
            //   f20f1084240c010000     | movsd    xmm0, qword ptr [esp + 0x10c]

        $sequence_4 = { c744247c00000000 6a08 58 89442424 e9???????? 31d2 8d9c24a0010000 }
            // n = 7, score = 200
            //   c744247c00000000     | mov                 dword ptr [esp + 0x7c], 0
            //   6a08                 | push                8
            //   58                   | pop                 eax
            //   89442424             | mov                 dword ptr [esp + 0x24], eax
            //   e9????????           |                     
            //   31d2                 | xor                 edx, edx
            //   8d9c24a0010000       | lea                 ebx, [esp + 0x1a0]

        $sequence_5 = { 894604 31c0 8906 83c430 5e 5f 5b }
            // n = 7, score = 200
            //   894604               | mov                 dword ptr [esi + 4], eax
            //   31c0                 | xor                 eax, eax
            //   8906                 | mov                 dword ptr [esi], eax
            //   83c430               | add                 esp, 0x30
            //   5e                   | pop                 esi
            //   5f                   | pop                 edi
            //   5b                   | pop                 ebx

        $sequence_6 = { 741e 8d5670 8d8c24480b0000 56 e8???????? 59 4b }
            // n = 7, score = 200
            //   741e                 | je                  0x20
            //   8d5670               | lea                 edx, [esi + 0x70]
            //   8d8c24480b0000       | lea                 ecx, [esp + 0xb48]
            //   56                   | push                esi
            //   e8????????           |                     
            //   59                   | pop                 ecx
            //   4b                   | dec                 ebx

        $sequence_7 = { 894d90 89d9 89461c 56 e8???????? 58 8b45e4 }
            // n = 7, score = 200
            //   894d90               | mov                 dword ptr [ebp - 0x70], ecx
            //   89d9                 | mov                 ecx, ebx
            //   89461c               | mov                 dword ptr [esi + 0x1c], eax
            //   56                   | push                esi
            //   e8????????           |                     
            //   58                   | pop                 eax
            //   8b45e4               | mov                 eax, dword ptr [ebp - 0x1c]

        $sequence_8 = { 31f6 39f0 7409 8a1c31 881c32 46 ebf3 }
            // n = 7, score = 200
            //   31f6                 | xor                 esi, esi
            //   39f0                 | cmp                 eax, esi
            //   7409                 | je                  0xb
            //   8a1c31               | mov                 bl, byte ptr [ecx + esi]
            //   881c32               | mov                 byte ptr [edx + esi], bl
            //   46                   | inc                 esi
            //   ebf3                 | jmp                 0xfffffff5

        $sequence_9 = { ff750c 53 e8???????? 83c410 89c1 8955f0 0faff8 }
            // n = 7, score = 200
            //   ff750c               | push                dword ptr [ebp + 0xc]
            //   53                   | push                ebx
            //   e8????????           |                     
            //   83c410               | add                 esp, 0x10
            //   89c1                 | mov                 ecx, eax
            //   8955f0               | mov                 dword ptr [ebp - 0x10], edx
            //   0faff8               | imul                edi, eax

    condition:
        7 of them and filesize < 598016
}