YARA · SEKOIA.IO Community
SEKOIA_Hacktool_Win_Gmer
Dtect the GMER hacktool based string and UPX usage
- Author
- Sekoia.io
- Date
- 2022-09-09
- Modified
- 2024-12-19
- Score / Quality
- 75 / 80
What this rule detects
Dtect the GMER hacktool based string and UPX usage
Targets: Windows PE.
It defines 3 patterns (3 text, 0 hex, 0 regex). YARA modules used: pe.
YARA-X says: warning[deprecated_field]: field `number_of_sections` is deprecated
Summary generated from the rule's metadata and condition.
Rule source
Includes the imports needed to compile it on its own.
import "pe"
rule SEKOIA_Hacktool_Win_Gmer : FILE
{
meta:
= "Dtect the GMER hacktool based string and UPX usage"
= "Sekoia.io"
= "d2f1aba1-4222-45e5-95bd-4d7f08595cea"
= "2022-09-09"
= "2024-12-19"
= "https://github.com/SEKOIA-IO/Community"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/hacktool_win_gmer.yar#L3-L24"
= "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
= "dbd4e97c343dcb14c6e814afa820a9fbb5aa4290c7ddf9d864029bb35bb96dbf"
= 75
= 80
= "FILE"
= "1.0"
= "TLP:CLEAR"
strings:
$pac = "IDI_GMER" wide
$str0 = "---- Processes - GMER %s ----" ascii
$str1 = "E:\\projects\\cpp\\gmer\\Release\\gmer.pdb" ascii
condition:
uint16( 0 ) == 0x5A4D and ( ( $pac and for any i in ( 0 .. pe.number_of_sections -1 ) : ( pe.sections [ i ] . name == "UPX0" ) ) or any of ( $str* ) ) and filesize < 900KB
}
Strings (3 patterns)
| Identifier | Type | Value | Modifiers |
|---|---|---|---|
| $pac | text | "IDI_GMER" | wide |
| $str0 | text | "---- Processes - GMER %s ----" | ascii |
| $str1 | text | "E:\\projects\\cpp\\gmer\\Release\\gmer.pdb" | ascii |
Condition
uint16( 0 ) == 0x5A4D and ( ( $pac and for any i in ( 0 .. pe.number_of_sections -1 ) : ( pe.sections [ i ] . name == "UPX0" ) ) or any of ( $str* ) ) and filesize < 900KBIn plain words (Heuristic)
- The file must start with “MZ” — a Windows executable (PE).
- The file must be smaller than 900KB (a cheap guard that skips large files).
- At least one pattern in ( $str* ) must match.
- A for-loop checks a property over several matches or items.
- Pattern $pac must be present.
- Uses the pe module.
- Checks PE sections (names, count or properties).
Test this rule in your browser
Drop a file to scan it with this rule using YARA-X compiled to WebAssembly. Nothing is uploaded.
References
Licence & attribution
Author: Sekoia.io
Source repository: SEKOIA.IO Community @ a438a5901a
Licence: Detection Rule License 1.1 (repository licence)
Mirrored via YARA Forge 20260927, which prefixes rule names with the source and adds normalised meta fields.
Rule id: d2f1aba1-4222-45e5-95bd-4d7f08595cea
Metadata
| version | 1.0 |
|---|---|
| classification | TLP:CLEAR |
Tags:FILE
Related rules
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-09-06
- Hack toolSEKOIA.IO Community· Sekoia.io· 2024-02-29
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-12-05
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-11-15
- Hack toolSEKOIA.IO Community· Sekoia.io· 2023-08-23
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-02-08
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-07-22
- Hack toolSEKOIA.IO Community· Sekoia.io· 2022-09-09