YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Cratpluginkeylogger
Detects CRAT keylogger plugin DLL
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects CRAT keylogger plugin DLL
Associated malware family: Cratpluginkeylogger.
Targets: Windows PE.
It defines 8 patterns (6 text, 0 hex, 2 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-cratpluginkeylogger.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Cratpluginkeylogger : FILE
{
meta:
= "Detects CRAT keylogger plugin DLL"
= "ditekSHen"
= "a8682786-7704-56f0-a6df-b4e2ab4d7536"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L1946-L1962"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "58ef1f7466fcc871be2e74aa447c76970fd90c9d9d345a896fb8e6335114d189"
= 75
= 75
= "FILE"
= "MALWARE.Win.Trojan.CRAT"
strings:
$ai1 = "VM detected!" fullword wide
$ai2 = "Sandbox detected!" fullword wide
$ai3 = "Debug detected!" fullword wide
$ai4 = "Analysis process detected!" fullword wide
$s1 = "Create KeyLogMutex %s failure %d" wide
$s2 = "Key Log Mutex already created! %s" wide
$s3 = /KeyLogThread\s(started|finished|terminated)!/ wide
$s4 = /KeyLog_(x64|x32|Win64|Win32)_DllRelease\.dll/ fullword ascii
condition:
uint16( 0 ) == 0x5a4d and ( ( all of ( $ai* ) and 1 of ( $s* ) ) or ( 3 of ( $s* ) and 1 of ( $ai* ) ) or 5 of them )
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $ai1 | text | "VM detected!" | fullword wide |
| $ai2 | text | "Sandbox detected!" | fullword wide |
| $ai3 | text | "Debug detected!" | fullword wide |
| $ai4 | text | "Analysis process detected!" | fullword wide |
| $s1 | text | "Create KeyLogMutex %s failure %d" | wide |
| $s2 | text | "Key Log Mutex already created! %s" | wide |
| $s3 | regex | /KeyLogThread\s(started|finished|terminated)!/ | wide |
| $s4 | regex | /KeyLog_(x64|x32|Win64|Win32)_DllRelease\.dll/ | fullword ascii |
Condition
uint16( 0 ) == 0x5a4d and ( ( all of ( $ai* ) and 1 of ( $s* ) ) or ( 3 of ( $s* ) and 1 of ( $ai* ) ) or 5 of them )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $ai* ) must match.
- At least 1 patterns in ( $s* ) must match.
- At least 3 patterns in ( $s* ) must match.
- At least 1 patterns in ( $ai* ) must match.
- At least 5 patterns in the rule 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: a8682786-7704-56f0-a6df-b4e2ab4d7536
Metadata
| clamav_sig | MALWARE.Win.Trojan.CRAT |
|---|
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