Skip to content

YARA · SEKOIA.IO Community

SEKOIA_Hacktool_Win_Gmer

Dtect the GMER hacktool based string and UPX usage

Hack toolSEKOIA.IO CommunityDetection Rule License 1.1Compiles with YARA-X (with warnings)
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.

hacktool-win-gmer.yarDetection Rule License 1.1
import "pe"

rule SEKOIA_Hacktool_Win_Gmer : FILE
{
	meta:
		description = "Dtect the GMER hacktool based string and UPX usage"
		author = "Sekoia.io"
		id = "d2f1aba1-4222-45e5-95bd-4d7f08595cea"
		date = "2022-09-09"
		modified = "2024-12-19"
		reference = "https://github.com/SEKOIA-IO/Community"
		source_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/yara_rules/hacktool_win_gmer.yar#L3-L24"
		license_url = "https://github.com/SEKOIA-IO/Community/blob/a438a5901a211c2abdf75da9c93921ef187473d1/LICENSE.md"
		logic_hash = "dbd4e97c343dcb14c6e814afa820a9fbb5aa4290c7ddf9d864029bb35bb96dbf"
		score = 75
		quality = 80
		tags = "FILE"
		version = "1.0"
		classification = "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)

IdentifierTypeValueModifiers
$pactext"IDI_GMER"wide
$str0text"---- Processes - GMER %s ----"ascii
$str1text"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

In 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.

Drop a file here or click to chooseScanned locally with YARA-X. Files up to 200 MB.

Open in editor

References

Licence & attribution

Author: Sekoia.io

Source repository: SEKOIA.IO Community @ a438a5901a

Licence: Detection Rule License 1.1 (repository licence)

Original rule

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

version1.0
classificationTLP:CLEAR

Tags:FILE