SYMBOLCOMMON_NAMEaka. SYNONYMS
win.nimrev (Back to overview)

Nimrev


Backdoor written in Nim.

References
2021-10-14Medium walmartglobaltechJason Reaves
@online{reaves:20211014:investigation:29ef29c, author = {Jason Reaves}, title = {{Investigation into the state of NIM malware Part 2}}, date = {2021-10-14}, organization = {Medium walmartglobaltech}, url = {https://medium.com/walmartglobaltech/investigation-into-the-state-of-nim-malware-part-2-a28bffffa671}, language = {English}, urldate = {2021-12-15} } Investigation into the state of NIM malware Part 2
Cobalt Strike NimGrabber Nimrev Unidentified 088 (Nim Ransomware)
Yara Rules
[TLP:WHITE] win_nimrev_auto (20230125 | Detects win.nimrev.)
rule win_nimrev_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2023-01-25"
        version = "1"
        description = "Detects win.nimrev."
        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.nimrev"
        malpedia_rule_date = "20230124"
        malpedia_hash = "2ee0eebba83dce3d019a90519f2f972c0fcf9686"
        malpedia_version = "20230125"
        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 = { 0f95c0 8845f6 eb01 90 0fb645f6 8845f7 }
            // n = 6, score = 200
            //   0f95c0               | mov                 dword ptr [ebp - 0x1c], 0x422df8
            //   8845f6               | mov                 edx, dword ptr [ebp - 0x30]
            //   eb01                 | mov                 eax, dword ptr [ebp - 0x2c]
            //   90                   | mov                 ecx, eax
            //   0fb645f6             | mov                 dword ptr [ebp - 0x1c], 0x422df8
            //   8845f7               | mov                 byte ptr [ebp - 9], 0

        $sequence_1 = { 3c39 7707 b801000000 eb05 }
            // n = 4, score = 200
            //   3c39                 | mov                 eax, dword ptr [ebp + 8]
            //   7707                 | sub                 eax, 1
            //   b801000000           | cmp                 edx, eax
            //   eb05                 | jb                  0x60a

        $sequence_2 = { 0fb600 0fb6c0 83f85c 7432 83f85c }
            // n = 5, score = 200
            //   0fb600               | jmp                 0x3f
            //   0fb6c0               | nop                 
            //   83f85c               | dec                 eax
            //   7432                 | mov                 dword ptr [ebp], 0x267
            //   83f85c               | dec                 eax

        $sequence_3 = { e8???????? eb04 90 eb01 90 90 }
            // n = 6, score = 200
            //   e8????????           |                     
            //   eb04                 | mov                 eax, dword ptr [ebp - 0xc]
            //   90                   | movzx               ecx, ax
            //   eb01                 | mov                 dword ptr [esp], ecx
            //   90                   | mov                 ecx, eax
            //   90                   | cmp                 dword ptr [ebp + 8], eax

        $sequence_4 = { e8???????? e8???????? eb04 90 }
            // n = 4, score = 200
            //   e8????????           |                     
            //   e8????????           |                     
            //   eb04                 | mov                 dword ptr [ebp - 0x40], eax
            //   90                   | dec                 eax

        $sequence_5 = { 8845e7 eb01 90 807de700 }
            // n = 4, score = 200
            //   8845e7               | push                ebx
            //   eb01                 | dec                 eax
            //   90                   | sub                 esp, 0x28
            //   807de700             | dec                 eax

        $sequence_6 = { 90 eb01 90 e8???????? 90 }
            // n = 5, score = 200
            //   90                   | nop                 
            //   eb01                 | jmp                 0x151
            //   90                   | nop                 
            //   e8????????           |                     
            //   90                   | mov                 dword ptr [ebp - 0xc], eax

        $sequence_7 = { 0fb600 3c39 7707 b801000000 }
            // n = 4, score = 200
            //   0fb600               | je                  0x264
            //   3c39                 | imul                eax, dword ptr [ebp - 0x18]
            //   7707                 | mov                 edx, dword ptr [ebp - 0x3c]
            //   b801000000           | add                 edx, 8

        $sequence_8 = { 0f93c0 83f001 84c0 7408 }
            // n = 4, score = 200
            //   0f93c0               | lea                 eax, [0x100d9]
            //   83f001               | dec                 eax
            //   84c0                 | mov                 dword ptr [ebp - 0x48], eax
            //   7408                 | jle                 0x73e

        $sequence_9 = { eb05 b800000000 8845f7 eb01 90 }
            // n = 5, score = 200
            //   eb05                 | cmp                 dword ptr [ebp - 0x18], 0
            //   b800000000           | jg                  0x12b8
            //   8845f7               | mov                 dword ptr [ebp - 0x44], 0x40f
            //   eb01                 | mov                 dword ptr [ebp - 0x44], 0x40e
            //   90                   | mov                 dword ptr [ebp - 0x40], 0x42431a

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