YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Klingonrat
Detects KlingonRAT
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects KlingonRAT
Associated malware family: Klingonrat.
Targets: Windows PE.
It defines 15 patterns (15 text, 0 hex, 0 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-klingonrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Klingonrat : FILE
{
meta:
= "Detects KlingonRAT"
= "ditekSHen"
= "bea50bce-b38c-50a0-902a-1014615bd9b8"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6405-L6427"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "2abfbfc1b67f931f15bfdfd2cd4ba7821e62eb8c518bbc04629c0dd694bbd9c1"
= 75
= 75
= "FILE"
strings:
$go = "Go build ID:" ascii
$s1 = "/UCRelease/src/client/uac/once/"
$s2 = "%T\\AppData\\Local\\Windows Update\\"
$s3 = "%TSoftware\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\"
$s4 = "wmic /namespace:'\\\\root\\subscription' PATH"
$s5 = "C:\\Windows\\System32\\fodhelper.exeCaption,ParentProcessId,ProcessId"
$s6 = "ldpro.exelsass.exeluall.exeluspt.exe"
$s7 = "scangui.exedeps/lsass.exeetrustcipe.exefile"
$s8 = "alogserv.exeaplica32.exeapvxdwin.exeatro55en.exeautodown.exeavconsol.exeavgserv9.exeavkwctl9.exeavltmain.exeavpdos32.exeavsynmgr.exeavwupd32.exeavwupsrv.exe"
$c1 = "%s/keyLogger?machineId=%s" ascii
$c2 = "%s/stealer?machineId=%s" ascii
$c3 = "%s/lsass?machineId=%s" ascii
$c4 = "%s/logger?machineId=%s" ascii
$c5 = "%s/machineInfo?machineId=%s" ascii
$c6 = "failurehttps://%s:%d/botif-modified-sinceillegal" ascii
condition:
uint16( 0 ) == 0x5a4d and ( $go ) and ( 3 of ( $c* ) or 5 of ( $s* ) or ( 3 of ( $s* ) and 1 of ( $c* ) ) )
}
Strings (15 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $go | text | "Go build ID:" | ascii |
| $s1 | text | "/UCRelease/src/client/uac/once/" | |
| $s2 | text | "%T\\AppData\\Local\\Windows Update\\" | |
| $s3 | text | "%TSoftware\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\" | |
| $s4 | text | "wmic /namespace:'\\\\root\\subscription' PATH" | |
| $s5 | text | "C:\\Windows\\System32\\fodhelper.exeCaption,ParentProcessId,ProcessId" | |
| $s6 | text | "ldpro.exelsass.exeluall.exeluspt.exe" | |
| $s7 | text | "scangui.exedeps/lsass.exeetrustcipe.exefile" | |
| $s8 | text | "alogserv.exeaplica32.exeapvxdwin.exeatro55en.exeautodown.exeavconsol.exeavgserv9.exeavkwctl9.exeavltmain.exeavpdos32.exeavsynmgr.exeavwupd32.exeavwupsrv.exe" | |
| $c1 | text | "%s/keyLogger?machineId=%s" | ascii |
| $c2 | text | "%s/stealer?machineId=%s" | ascii |
| $c3 | text | "%s/lsass?machineId=%s" | ascii |
| $c4 | text | "%s/logger?machineId=%s" | ascii |
| $c5 | text | "%s/machineInfo?machineId=%s" | ascii |
| $c6 | text | "failurehttps://%s:%d/botif-modified-sinceillegal" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( $go ) and ( 3 of ( $c* ) or 5 of ( $s* ) or ( 3 of ( $s* ) and 1 of ( $c* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least 3 patterns in ( $c* ) must match.
- At least 5 patterns in ( $s* ) must match.
- At least 3 patterns in ( $s* ) must match.
- At least 1 patterns in ( $c* ) must match.
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.
References
Licence & attribution
Author: ditekSHen
Source repository: ditekSHen detection @ e76c93dcde
Licence: BSD 2-Clause License (repository licence)
Copyright notice: Copyright 2021 by ditekSHen (https://github.com/ditekshen/detection).
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: bea50bce-b38c-50a0-902a-1014615bd9b8
Tags:FILE
Related rules
- MalwareditekSHen detection· ditekSHen· 2034-02-17
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06
- MalwareditekSHen detection· ditekSHen· 2020-11-06