YARA · ditekSHen detection
DITEKSHEN_MALWARE_Win_Gravityrat
Detects GravityRAT
- Author
- ditekSHen
- Date
- 2020-11-06
- Modified
- 2024-11-01
- Score / Quality
- 75 / 75
What this rule detects
Detects GravityRAT
Associated malware family: Gravityrat.
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-gravityrat.yarBSD 2-Clause License
rule DITEKSHEN_MALWARE_Win_Gravityrat : FILE
{
meta:
= "Detects GravityRAT"
= "ditekSHen"
= "cb581dd6-15b2-54ae-9f27-30ec21554fb9"
= "2020-11-06"
= "2024-11-01"
= "https://github.com/ditekshen/detection"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/yara/malware.yar#L6086-L6108"
= "https://github.com/ditekshen/detection/blob/e76c93dcdedff04076380ffc60ea54e45b313635/LICENSE.txt"
= "a6b049dbf21f22f751c15da98536e9ef2a4ced7755ade0cc9904afddef1d3ae6"
= 75
= 75
= "FILE"
strings:
$s1 = "/GX/GX-Server.php?VALUE=2&Type=" wide
$s2 = "&SIGNATUREHASH=" wide
$s3 = "Error => CommonFunctionClass => Upload()" wide
$s4 = "/GetActiveDomains.php" wide
$s5 = "DetectVM" ascii wide
$s6 = "/c {0} > {1}" wide
$s7 = "DRIVEUPLOADCOMPLETED => TOTALFILES={0}, FILESUPLOADED={1}" wide
$s8 = "Program => RunAFile()" wide
$s9 = "DoViaCmd" ascii
$s10 = ".msoftupdates.com:" wide
$f1 = "<RootJob>b__" ascii
$f2 = "<GetFiles>b__" ascii
$f3 = "<UpdateServer>b__" ascii
$f4 = "<EthernetId>b__" ascii
$f5 = "<MatchMacAdd>b__" ascii
condition:
uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) or ( all of ( $f* ) and 1 of ( $s* ) ) )
}
Strings (15 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $s1 | text | "/GX/GX-Server.php?VALUE=2&Type=" | wide |
| $s2 | text | "&SIGNATUREHASH=" | wide |
| $s3 | text | "Error => CommonFunctionClass => Upload()" | wide |
| $s4 | text | "/GetActiveDomains.php" | wide |
| $s5 | text | "DetectVM" | ascii wide |
| $s6 | text | "/c {0} > {1}" | wide |
| $s7 | text | "DRIVEUPLOADCOMPLETED => TOTALFILES={0}, FILESUPLOADED={1}" | wide |
| $s8 | text | "Program => RunAFile()" | wide |
| $s9 | text | "DoViaCmd" | ascii |
| $s10 | text | ".msoftupdates.com:" | wide |
| $f1 | text | "<RootJob>b__" | ascii |
| $f2 | text | "<GetFiles>b__" | ascii |
| $f3 | text | "<UpdateServer>b__" | ascii |
| $f4 | text | "<EthernetId>b__" | ascii |
| $f5 | text | "<MatchMacAdd>b__" | ascii |
Condition
uint16( 0 ) == 0x5a4d and ( 5 of ( $s* ) or ( all of ( $f* ) and 1 of ( $s* ) ) )In plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- All patterns in ( $f* ) must match.
- At least 5 patterns in ( $s* ) must match.
- At least 1 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: cb581dd6-15b2-54ae-9f27-30ec21554fb9
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