YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Markirat
Detects MarkiRAT
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects MarkiRAT
Associated malware family: Markirat.
Targets: Windows PE.
It defines 16 patterns (15 text, 0 hex, 1 regex).
Summary generated from the rule's metadata and condition.
Rule source
malware-win-markirat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Markirat : FILE
{
meta:
= "Detects MarkiRAT"
= "ditekSHen"
= "6cfa276c-a64e-532a-a1ae-11a9e00867bd"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6380-L6403"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "17b8bcfe8d2b4c87ff8e0bddb436e18029a3b28a5ad3994fe9bef359588d9cad"
= 75
= 75
= "FILE"
strings:
$pdb = "\\mfcmklg.pdb" ascii
$s1 = "runinhome Completed" wide
$s2 = "ERROR find next file<br>" wide
$s3 = "<br><mark>Hello: %s</mark>" wide
$s4 = "<br><mark>CLIPBOARD[" wide
$s5 = "@userhome@" wide
$s6 = "Global\\{2194ABA1-BFFA-4e6b-8C26-D1BB20190312}" wide
$s7 = "taskkill /im svehost.exe /t /f" fullword ascii
$s8 = "taskkill /im keepass.exe /t /f" fullword ascii
$ba = /bitsadmin \/(addfile|cancel|SetPriority|resume)/ ascii wide
$c1 = "/ech/client.php?u=" wide
$c2 = "/up/uploadx.php?u=" wide
$c3 = "/ech/echo.php?req=rr&u=" wide
$c4 = "/ech/rite.php" wide
$c5 = "http://microsoft.com-view.space/i.php?u=" wide
$c6 = "Content-Disposition: form-data; name=\"uploadedfile\"; filename=\"" ascii
condition:
uint16( 0 ) == 0x5a4d and ( ( $pdb and any of them ) or ( 5 of ( $s* ) ) or ( 3 of ( $c* ) ) or ( ( #ba > 3 and 4 of them ) ) )
}
Strings (16 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $pdb | text | "\\mfcmklg.pdb" | ascii |
| $s1 | text | "runinhome Completed" | wide |
| $s2 | text | "ERROR find next file<br>" | wide |
| $s3 | text | "<br><mark>Hello: %s</mark>" | wide |
| $s4 | text | "<br><mark>CLIPBOARD[" | wide |
| $s5 | text | "@userhome@" | wide |
| $s6 | text | "Global\\{2194ABA1-BFFA-4e6b-8C26-D1BB20190312}" | wide |
| $s7 | text | "taskkill /im svehost.exe /t /f" | fullword ascii |
| $s8 | text | "taskkill /im keepass.exe /t /f" | fullword ascii |
| $ba | regex | /bitsadmin \/(addfile|cancel|SetPriority|resume)/ | ascii wide |
| $c1 | text | "/ech/client.php?u=" | wide |
| $c2 | text | "/up/uploadx.php?u=" | wide |
| $c3 | text | "/ech/echo.php?req=rr&u=" | wide |
| $c4 | text | "/ech/rite.php" | wide |
| $c5 | text | "http://microsoft.com-view.space/i.php?u=" | wide |
| $c6 | text | "Content-Disposition: form-data; name=\"uploadedfile\"; filename=\"" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( ( $pdb and any of them ) or ( 5 of ( $s* ) ) or ( 3 of ( $c* ) ) or ( ( #ba > 3 and 4 of them ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- At least one pattern in the rule must match.
- At least 5 patterns in ( $s* ) must match.
- At least 3 patterns in ( $c* ) must match.
- At least 4 patterns in the rule must match.
- Pattern $ba must occur > 3 times.
- Pattern $pdb must be present.
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: 6cfa276c-a64e-532a-a1ae-11a9e00867bd
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