SYMBOLCOMMON_NAMEaka. SYNONYMS
win.darkrat (Back to overview)

DarkRat

VTCollection    

There is no description at this point.

References
2020-01-07Github (albertzsigovits)Albert Zsigovits
DarkRat v2.2.0
DarkRat
2019-12-23FR3D.HKFred HK
DarkRat - Hacking a malware control panel
DarkRat
Yara Rules
[TLP:WHITE] win_darkrat_auto (20230808 | Detects win.darkrat.)
rule win_darkrat_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2023-12-06"
        version = "1"
        description = "Detects win.darkrat."
        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.darkrat"
        malpedia_rule_date = "20231130"
        malpedia_hash = "fc8a0e9f343f6d6ded9e7df1a64dac0cc68d7351"
        malpedia_version = "20230808"
        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 = { 837de810 895510 8b4804 8d45d4 0f4345d4 2975b4 }
            // n = 6, score = 200
            //   837de810             | cmp                 dword ptr [ebp - 0x18], 0x10
            //   895510               | mov                 dword ptr [ebp + 0x10], edx
            //   8b4804               | mov                 ecx, dword ptr [eax + 4]
            //   8d45d4               | lea                 eax, [ebp - 0x2c]
            //   0f4345d4             | cmovae              eax, dword ptr [ebp - 0x2c]
            //   2975b4               | sub                 dword ptr [ebp - 0x4c], esi

        $sequence_1 = { 51 03f8 52 57 e8???????? 8b45c8 83c40c }
            // n = 7, score = 200
            //   51                   | push                ecx
            //   03f8                 | add                 edi, eax
            //   52                   | push                edx
            //   57                   | push                edi
            //   e8????????           |                     
            //   8b45c8               | mov                 eax, dword ptr [ebp - 0x38]
            //   83c40c               | add                 esp, 0xc

        $sequence_2 = { 51 56 e8???????? 83c40c c6043e00 eb17 57 }
            // n = 7, score = 200
            //   51                   | push                ecx
            //   56                   | push                esi
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   c6043e00             | mov                 byte ptr [esi + edi], 0
            //   eb17                 | jmp                 0x19
            //   57                   | push                edi

        $sequence_3 = { 8b7dd4 0f8514ffffff 8b55ec 83fa10 }
            // n = 4, score = 200
            //   8b7dd4               | mov                 edi, dword ptr [ebp - 0x2c]
            //   0f8514ffffff         | jne                 0xffffff1a
            //   8b55ec               | mov                 edx, dword ptr [ebp - 0x14]
            //   83fa10               | cmp                 edx, 0x10

        $sequence_4 = { 8bd0 b805000000 2bd6 8a0e 8d7601 884c32ff 83e801 }
            // n = 7, score = 200
            //   8bd0                 | mov                 edx, eax
            //   b805000000           | mov                 eax, 5
            //   2bd6                 | sub                 edx, esi
            //   8a0e                 | mov                 cl, byte ptr [esi]
            //   8d7601               | lea                 esi, [esi + 1]
            //   884c32ff             | mov                 byte ptr [edx + esi - 1], cl
            //   83e801               | sub                 eax, 1

        $sequence_5 = { e8???????? 83c408 c745e800000000 8d4dd8 }
            // n = 4, score = 200
            //   e8????????           |                     
            //   83c408               | add                 esp, 8
            //   c745e800000000       | mov                 dword ptr [ebp - 0x18], 0
            //   8d4dd8               | lea                 ecx, [ebp - 0x28]

        $sequence_6 = { 0b510c 52 e8???????? c745fc04000000 e8???????? 84c0 7507 }
            // n = 7, score = 200
            //   0b510c               | or                  edx, dword ptr [ecx + 0xc]
            //   52                   | push                edx
            //   e8????????           |                     
            //   c745fc04000000       | mov                 dword ptr [ebp - 4], 4
            //   e8????????           |                     
            //   84c0                 | test                al, al
            //   7507                 | jne                 9

        $sequence_7 = { 83c408 c745e800000000 8d4dd8 c745ec0f000000 c645d800 }
            // n = 5, score = 200
            //   83c408               | add                 esp, 8
            //   c745e800000000       | mov                 dword ptr [ebp - 0x18], 0
            //   8d4dd8               | lea                 ecx, [ebp - 0x28]
            //   c745ec0f000000       | mov                 dword ptr [ebp - 0x14], 0xf
            //   c645d800             | mov                 byte ptr [ebp - 0x28], 0

        $sequence_8 = { ff75d0 51 8bcb e8???????? 8b75b8 c645fc01 }
            // n = 6, score = 200
            //   ff75d0               | push                dword ptr [ebp - 0x30]
            //   51                   | push                ecx
            //   8bcb                 | mov                 ecx, ebx
            //   e8????????           |                     
            //   8b75b8               | mov                 esi, dword ptr [ebp - 0x48]
            //   c645fc01             | mov                 byte ptr [ebp - 4], 1

        $sequence_9 = { 895510 8b4804 8d45d4 0f4345d4 2975b4 03c6 ff75b4 }
            // n = 7, score = 200
            //   895510               | mov                 dword ptr [ebp + 0x10], edx
            //   8b4804               | mov                 ecx, dword ptr [eax + 4]
            //   8d45d4               | lea                 eax, [ebp - 0x2c]
            //   0f4345d4             | cmovae              eax, dword ptr [ebp - 0x2c]
            //   2975b4               | sub                 dword ptr [ebp - 0x4c], esi
            //   03c6                 | add                 eax, esi
            //   ff75b4               | push                dword ptr [ebp - 0x4c]

    condition:
        7 of them and filesize < 884736
}
[TLP:WHITE] win_darkrat_w0   (20191012 | No description)
rule win_darkrat_w0 {
    meta:
        author = "Albert Zsigovits"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.darkrat"
        malpedia_version = "20191012"
        malpedia_license = "CC BY-SA 4.0"
        malpedia_sharing = "TLP:WHITE"
            
    strings:
	    $pdb = "C:\\Users\\darkspider" ascii wide
	    $cmd = "cmd.exe /C ping 127.0.0.1 -n 1 -w 3000 > Nul & Del /f /q \"%s\"" ascii wide

	    $guid1 = "SOFTWARE\\Microsoft\\Cryptography" ascii wide
	    $guid2 = "MachineGuid" ascii wide

	    $persi1 = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" ascii wide
	    $persi2 = "WinSystem32" ascii wide

	    $bin = "pastebin.com/raw/" ascii wide
	    $import0 = "NtUnmapViewOfSection" ascii wide
	    $import1 = "WriteProcessMemory" ascii wide
	    $import2 = "ResumeThread" ascii wide
	    $import3 = "GetNativeSystemInfo" ascii wide
	    $import4 = "URLOpenBlockingStream" ascii wide
	    $import5 = "VirtualFree" ascii wide
	    $import6 = "VirtualAlloc" ascii wide
	    $import7 = "GetModuleHandle" ascii wide
	    $import8 = "LoadLibrary" ascii wide
	    $import9 = "CreateMutex" ascii wide

	    $vbs0 = "Set objShell = WScript.CreateObject(\"WScript.Shell\")" ascii wide
	    $vbs1 = "Set objWMIService = GetObject(\"winmgmts:\\\\\" & sComputerName & \"\\root\\cimv2\")" ascii wide
	    $vbs2 = "Set objItems = objWMIService.ExecQuery(sQuery)" ascii wide
	    $vbs3 = "sQuery = \"SELECT * FROM Win32_Process\"" ascii wide
	    $vbs4 = "wscript.exe" ascii wide

	    $net0 = "POST" ascii wide
	    $net1 = "&taskid=" ascii wide
	    $net2 = "&taskstatus=" ascii wide
	    $net3 = "&spreadtag=" ascii wide
	    $net4 = "&operingsystem=" ascii wide
	    $net5 = "&arch=" ascii wide
	    $net6 = "&cpuName=" ascii wide
	    $net7 = "&gpuName=" ascii wide
	    $net8 = "&botversion=" ascii wide
	    $net9 = "&antivirus=" ascii wide
	    $net10 = "&netFramework4=" ascii wide
	    $net11 = "&netFramework35=" ascii wide
	    $net12 = "&netFramework3=" ascii wide
	    $net13 = "&netFramework2=" ascii wide
	    $net14 = "&installedRam=" ascii wide
	    $net15 = "&aornot=" ascii wide
	    $net16 = "&computername=" ascii wide
	    $net17 = "hwid=" ascii wide
	    $net18 = "request=" ascii wide

    condition:
	    $pdb or $cmd or ( all of ($guid*) and all of ($persi*) ) or ( 3 of ($vbs*) ) or ( all of ($import*) and $bin ) or ( all of ($net*) )
}
[TLP:WHITE] win_darkrat_w1   (20191012 | Darkrat)
rule win_darkrat_w1 {
    meta:
        description = "Darkrat"
        author = "James_inthe_box"
        reference = "https://github.com/albertzsigovits/malware-writeups/tree/master/DarkRATv2"
        date = "2019/08"
        maltype = "RAT"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.darkrat"
        malpedia_version = "20191012"
        malpedia_license = "CC BY-SA 4.0"
        malpedia_sharing = "TLP:WHITE"
 
    strings:
        $string1 = "Set objShell = WScript.CreateObject(\"WScript.Shell\")"
        $string2 = "&taskstatus="
        $string3 = "network reset"
        $string4 = "text/plain"
        $string5 = "&antivirus="
        $string6 = "request="
        $string7 = "&arch="
 
    condition:
        all of ($string*)
}
Download all Yara Rules