YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_CRAT
Detects CRAT main DLL
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects CRAT main DLL
Associated malware family: Crat.
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-crat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_CRAT : FILE
{
meta:
= "Detects CRAT main DLL"
= "ditekSHen"
= "9757a8de-61ea-55c0-b64c-055798450985"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L1922-L1944"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "5a9fef68e110a1564dd5956408abcc3736cfa6853e1ac5510a089cc68f6bdc35"
= 75
= 75
= "FILE"
strings:
$s1 = "cmd /c \"dir %s /s >> %s\"" wide
$s2 = "Set-Cookie:\\b*{.+?}\\n" wide
$s3 = "Location: {[0-9]+}" wide
$s4 = "Content-Disposition: form-data; name=\"%s\"; filename=\"" ascii
$s6 = "%serror.log" wide
$v2x_1 = "?timestamp=%u" wide
$v2x_2 = "config.txt" wide
$v2x_3 = "entdll.dll" wide
$v2x_4 = "\\cmd.exe" wide
$v2x_5 = "[MyDocuments]" wide
$v2x_6 = "@SetWindowTextW FindFileExA" wide
$v2x_7 = "Microsoft\\Windows\\WinX\\Group1\\*.exe" wide
$v2s_1 = "Installed Anti Virus Programs" ascii
$v2s_2 = "Running Processes" ascii
$v2s_3 = "id=%u&content=" ascii
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or 6 of ( $v2x* ) or all of ( $v2s* ) or ( 2 of ( $v2s* ) and 4 of ( $v2x* ) ) )
}
Strings (15 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "cmd /c \"dir %s /s >> %s\"" | wide |
| $s2 | text | "Set-Cookie:\\b*{.+?}\\n" | wide |
| $s3 | text | "Location: {[0-9]+}" | wide |
| $s4 | text | "Content-Disposition: form-data; name=\"%s\"; filename=\"" | ascii |
| $s6 | text | "%serror.log" | wide |
| $v2x_1 | text | "?timestamp=%u" | wide |
| $v2x_2 | text | "config.txt" | wide |
| $v2x_3 | text | "entdll.dll" | wide |
| $v2x_4 | text | "\\cmd.exe" | wide |
| $v2x_5 | text | "[MyDocuments]" | wide |
| $v2x_6 | text | "@SetWindowTextW FindFileExA" | wide |
| $v2x_7 | text | "Microsoft\\Windows\\WinX\\Group1\\*.exe" | wide |
| $v2s_1 | text | "Installed Anti Virus Programs" | ascii |
| $v2s_2 | text | "Running Processes" | ascii |
| $v2s_3 | text | "id=%u&content=" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $s* ) or 6 of ( $v2x* ) or all of ( $v2s* ) or ( 2 of ( $v2s* ) and 4 of ( $v2x* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $s* ) must match.
- All patterns in ( $v2s* ) must match.
- At least 6 patterns in ( $v2x* ) must match.
- At least 2 patterns in ( $v2s* ) must match.
- At least 4 patterns in ( $v2x* ) 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: 9757a8de-61ea-55c0-b64c-055798450985
Tags:FILE
Related rules
- MalwareMalpedia signator rules· Felix Bilstein - yara-signator at cocacoding dot com· 2026-05-04
- 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