SYMBOLCOMMON_NAMEaka. SYNONYMS
win.hzrat (Back to overview)

HZ RAT


There is no description at this point.

References
2022-11-16Medium (@DCSO_CyTec)Johann Aydinbas, Axel Wauer
@online{aydinbas:20221116:hz:b5a2d6d, author = {Johann Aydinbas and Axel Wauer}, title = {{HZ RAT goes China}}, date = {2022-11-16}, organization = {Medium (@DCSO_CyTec)}, url = {https://medium.com/@DCSO_CyTec/hz-rat-goes-china-506854c5f2e2}, language = {English}, urldate = {2022-11-18} } HZ RAT goes China
HZ RAT
Yara Rules
[TLP:WHITE] win_hzrat_auto (20221125 | Detects win.hzrat.)
rule win_hzrat_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2022-11-21"
        version = "1"
        description = "Detects win.hzrat."
        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.hzrat"
        malpedia_rule_date = "20221118"
        malpedia_hash = "e0702e2e6d1d00da65c8a29a4ebacd0a4c59e1af"
        malpedia_version = "20221125"
        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 = { 83c410 eb36 ff7514 b9ff030000 663bc1 77ba 8365f800 }
            // n = 7, score = 100
            //   83c410               | add                 esp, 0x10
            //   eb36                 | jmp                 0x38
            //   ff7514               | push                dword ptr [ebp + 0x14]
            //   b9ff030000           | mov                 ecx, 0x3ff
            //   663bc1               | cmp                 ax, cx
            //   77ba                 | ja                  0xffffffbc
            //   8365f800             | and                 dword ptr [ebp - 8], 0

        $sequence_1 = { 4b 8955f4 8b55f0 6a03 8b048510fa4200 5f c644022c0a }
            // n = 7, score = 100
            //   4b                   | dec                 ebx
            //   8955f4               | mov                 dword ptr [ebp - 0xc], edx
            //   8b55f0               | mov                 edx, dword ptr [ebp - 0x10]
            //   6a03                 | push                3
            //   8b048510fa4200       | mov                 eax, dword ptr [eax*4 + 0x42fa10]
            //   5f                   | pop                 edi
            //   c644022c0a           | mov                 byte ptr [edx + eax + 0x2c], 0xa

        $sequence_2 = { 8bce ff7508 8b4020 ffd0 8b17 8bcf 8ad8 }
            // n = 7, score = 100
            //   8bce                 | mov                 ecx, esi
            //   ff7508               | push                dword ptr [ebp + 8]
            //   8b4020               | mov                 eax, dword ptr [eax + 0x20]
            //   ffd0                 | call                eax
            //   8b17                 | mov                 edx, dword ptr [edi]
            //   8bcf                 | mov                 ecx, edi
            //   8ad8                 | mov                 bl, al

        $sequence_3 = { 0faee8 0fb67ef1 0fb642f1 2bf8 7410 33c9 }
            // n = 6, score = 100
            //   0faee8               | lfence              
            //   0fb67ef1             | movzx               edi, byte ptr [esi - 0xf]
            //   0fb642f1             | movzx               eax, byte ptr [edx - 0xf]
            //   2bf8                 | sub                 edi, eax
            //   7410                 | je                  0x12
            //   33c9                 | xor                 ecx, ecx

        $sequence_4 = { 3bf3 720e 4e 42 0fb606 80b898e2420000 74e9 }
            // n = 7, score = 100
            //   3bf3                 | cmp                 esi, ebx
            //   720e                 | jb                  0x10
            //   4e                   | dec                 esi
            //   42                   | inc                 edx
            //   0fb606               | movzx               eax, byte ptr [esi]
            //   80b898e2420000       | cmp                 byte ptr [eax + 0x42e298], 0
            //   74e9                 | je                  0xffffffeb

        $sequence_5 = { c7401816000000 e8???????? 83c418 83c8ff e9???????? }
            // n = 5, score = 100
            //   c7401816000000       | mov                 dword ptr [eax + 0x18], 0x16
            //   e8????????           |                     
            //   83c418               | add                 esp, 0x18
            //   83c8ff               | or                  eax, 0xffffffff
            //   e9????????           |                     

        $sequence_6 = { 8945fc 0fb73458 e8???????? 6a04 }
            // n = 4, score = 100
            //   8945fc               | mov                 dword ptr [ebp - 4], eax
            //   0fb73458             | movzx               esi, word ptr [eax + ebx*2]
            //   e8????????           |                     
            //   6a04                 | push                4

        $sequence_7 = { 85c9 0f9fc0 8d0c45ffffffff 85c9 0f852b050000 8b4608 3b4208 }
            // n = 7, score = 100
            //   85c9                 | test                ecx, ecx
            //   0f9fc0               | setg                al
            //   8d0c45ffffffff       | lea                 ecx, [eax*2 - 1]
            //   85c9                 | test                ecx, ecx
            //   0f852b050000         | jne                 0x531
            //   8b4608               | mov                 eax, dword ptr [esi + 8]
            //   3b4208               | cmp                 eax, dword ptr [edx + 8]

        $sequence_8 = { 030c9510fa4200 f6412d01 7431 8b4510 c6401c01 c7401816000000 50 }
            // n = 7, score = 100
            //   030c9510fa4200       | add                 ecx, dword ptr [edx*4 + 0x42fa10]
            //   f6412d01             | test                byte ptr [ecx + 0x2d], 1
            //   7431                 | je                  0x33
            //   8b4510               | mov                 eax, dword ptr [ebp + 0x10]
            //   c6401c01             | mov                 byte ptr [eax + 0x1c], 1
            //   c7401816000000       | mov                 dword ptr [eax + 0x18], 0x16
            //   50                   | push                eax

        $sequence_9 = { 7467 ff75e4 57 ff7520 ff75e0 }
            // n = 5, score = 100
            //   7467                 | je                  0x69
            //   ff75e4               | push                dword ptr [ebp - 0x1c]
            //   57                   | push                edi
            //   ff7520               | push                dword ptr [ebp + 0x20]
            //   ff75e0               | push                dword ptr [ebp - 0x20]

    condition:
        7 of them and filesize < 409600
}
Download all Yara Rules