YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Karkoff
Detects Karkoff
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects Karkoff
Associated malware family: Karkoff.
Targets: Windows PE.
It defines 8 patterns (7 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-karkoff.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Karkoff : FILE
{
meta:
= "Detects Karkoff"
= "ditekSHen"
= "7d2fe783-18b3-5d84-a9b5-e8e0b5a0db98"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L5298-L5313"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "e9b6ba5be2b3cd0faa898347e57cee5a57b80b19842c3a1ddb42d620307c8b39"
= 75
= 75
= "FILE"
strings:
$x1 = "C:\\Windows\\Temp\\MSEx_log.txt" fullword wide
$x2 = "CMD.exe" fullword wide
$x3 = "Karkoff.ProjectInstaller.resources" fullword ascii
$s1 = /try\shttp(s)?\s(ip|domain)/ fullword wide
$s2 = "Reg cleaned!" fullword wide nocase
$s3 = "Content-Disposition: form-data; name=\"{1}\"" fullword wide
$s4 = "^[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}$" fullword wide
$s5 = "new backdoor" fullword wide
condition:
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or 4 of ( $s* ) or ( 2 of ( $x* ) and 2 of ( $s* ) ) )
}
Strings (8 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $x1 | text | "C:\\Windows\\Temp\\MSEx_log.txt" | fullword wide |
| $x2 | text | "CMD.exe" | fullword wide |
| $x3 | text | "Karkoff.ProjectInstaller.resources" | fullword ascii |
| $s1 | regex | /try\shttp(s)?\s(ip|domain)/ | fullword wide |
| $s2 | text | "Reg cleaned!" | fullword wide nocase |
| $s3 | text | "Content-Disposition: form-data; name=\"{1}\"" | fullword wide |
| $s4 | text | "^[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}$" | fullword wide |
| $s5 | text | "new backdoor" | fullword wide |
Condition
uint16( 0 ) == 0x5a4d and ( all of ( $x* ) or 4 of ( $s* ) or ( 2 of ( $x* ) and 2 of ( $s* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $x* ) must match.
- At least 4 patterns in ( $s* ) must match.
- At least 2 patterns in ( $x* ) must match.
- At least 2 patterns in ( $s* ) 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: 7d2fe783-18b3-5d84-a9b5-e8e0b5a0db98
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