Latest alertCVE-2018-11776 in Apache Struts Confirmed Exploited in the WildRead
Search all news in the platform

Detection rule

HackTool - GMER Rootkit Detector and Remover Execution

HighTest-data validatedSigmaHQ (community)T1685

Overview

Detects the execution GMER tool based on image and hash fields.

Rule id
9082ff1f-88ab-4678-a3cc-5bcff99fc74d
ATT&CK techniques
T1685 Disable or Modify Tools
Severity
High
Confidence
Low
Origin
SigmaHQ (community)
SigmaHQ status
test
Used in defense packs
n0n, The Gentlemen, qilin, INC Ransom, Akira, safepay, Play, braincipher, majinahanashi

Validation

  1. ExperimentalSyntax checked only. Not yet tested on events.
  2. Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
  3. SIEM-validatedRun in a real SIEM, with a recorded result.

2 of 2 positive test events matched; 1 of 1 near-miss events were correctly ignored. Community rule reused unmodified from SigmaHQ. OffSet7 converted it and tested it on synthetic events.

Detection logic and queries

Queries are shown exactly as generated. Test them in your environment before you deploy them.

Sigma

Sigma (YAML) · 9082ff1f-88ab-4678-a3cc-5bcff99fc74d

Download
title: HackTool - GMER Rootkit Detector and Remover Execution
id: 9082ff1f-88ab-4678-a3cc-5bcff99fc74d
status: test
description: Detects the execution GMER tool based on image and hash fields.
references:
    - http://www.gmer.net/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-10-05
modified: 2024-11-23
tags:
    - attack.stealth
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        Image|endswith: '\gmer.exe'
    selection_sysmon_hash:
        Hashes|contains:
            - 'MD5=E9DC058440D321AA17D0600B3CA0AB04'
            - 'SHA1=539C228B6B332F5AA523E5CE358C16647D8BBE57'
            - 'SHA256=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173'
    condition: 1 of selection_*
falsepositives:
    - Unlikely
level: high

QRadar AQL

IBM QRadar AQL (hunting query)Hunting query

Hunting search for the Log Activity tab or the API. It is not a QRadar rule.

AQL search for the Log Activity tab or the API. It is NOT a deployable QRadar rule: real-time detection in QRadar is a CRE (Custom Rule Engine) rule, for which this build only writes a design specification (qradar_cre).

SELECT * FROM events WHERE devicetype=12 AND ((LOWER("Process Path") LIKE '%\gmer.exe' OR LOWER("Process Name") LIKE '%\gmer.exe') OR (LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%md5=e9dc058440d321aa17d0600b3ca0ab04%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%sha1=539c228b6b332f5aa523e5ce358c16647d8bbe57%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%sha256=e8a3e804a96c716a3e9b69195db6ffb0d33e2433af871e4d4e1eab3097237173%'))

QRadar CRE

Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.

Rule name
OffSet7: HackTool - GMER Rootkit Detector and Remover Execution
Rule type
Event rule (Local)
Log source types
Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

Building blocks

  • BB:OffSet7:HackTool GMER Rootkit Detector and Remover Execu:selection_img (match)
    All test lines must match (AND).
    • Process Path / Process Name ends with: \gmer.exe
  • BB:OffSet7:HackTool GMER Rootkit Detector and Remover Execu:selection_sysmon_hash (match)
    All test lines must match (AND).
    • CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH') contains: MD5=E9DC058440D321AA17D0600B3CA0AB04, SHA1=539C228B6B332F5AA523E5CE358C16647D8BBE57, SHA256=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173

Main rule, option A (building blocks)

  1. when the event(s) were detected by one or more of these log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1
  2. when an event matches the condition built from these building blocks: (ANY of [BB:OffSet7:HackTool GMER Rootkit Detector AND Remover Execu:selection_img, BB:OffSet7:HackTool GMER Rootkit Detector AND Remover Execu:selection_sysmon_hash])

Main rule, option B (AQL filter test)

  1. when the event matches this AQL filter query: devicetype=12 AND ((LOWER("Process Path") LIKE '%\gmer.exe' OR LOWER("Process Name") LIKE '%\gmer.exe') OR (LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%md5=e9dc058440d321aa17d0600b3ca0ab04%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%sha1=539c228b6b332f5aa523e5ce358c16647d8bbe57%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%sha256=e8a3e804a96c716a3e9b69195db6ffb0d33e2433af871e4d4e1eab3097237173%'))

Rule response

  • Severity 7, credibility 6, relevance 7
  • Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
  • Respond no more than once per 30 minutes per Log Source (tune per environment)

Limitations

  • QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Splunk

Splunk SPLSearch

Search for Splunk with Windows/Sysmon field names. A scheduled search or ES correlation search also needs a schedule, time range, throttling and an adaptive response, set in your environment.

Image="*\\gmer.exe" OR Hashes IN ("*MD5=E9DC058440D321AA17D0600B3CA0AB04*", "*SHA1=539C228B6B332F5AA523E5CE358C16647D8BBE57*", "*SHA256=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173*")

Splunk savedsearches.conf stanzaScheduled search template

Template stanza. Review schedule, alert actions and index/sourcetype for your environment before enabling.

[default]
dispatch.earliest_time = -30d
dispatch.latest_time = now

[HackTool - GMER Rootkit Detector and Remover Execution]
description = Detects the execution GMER tool based on image and hash fields.
search = Image="*\\gmer.exe" OR Hashes IN ("*MD5=E9DC058440D321AA17D0600B3CA0AB04*", "*SHA1=539C228B6B332F5AA523E5CE358C16647D8BBE57*", "*SHA256=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173*")

Microsoft Sentinel

Microsoft Sentinel KQL (ASIM)Hunting query

Hunting query over ASIM-normalized tables. An analytics rule also needs a schedule, entity mapping and alert grouping.

imProcessCreate
| where TargetProcessName endswith "\\gmer.exe" or (TargetProcessMD5 startswith "E9DC058440D321AA17D0600B3CA0AB04" or TargetProcessSHA1 startswith "539C228B6B332F5AA523E5CE358C16647D8BBE57" or TargetProcessSHA256 startswith "E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173")

Defender XDR

Microsoft Defender XDR KQLHunting query

Advanced hunting query. A custom detection rule also needs a frequency, impacted entities and actions.

DeviceProcessEvents
| where FolderPath endswith "\\gmer.exe" or (MD5 startswith "E9DC058440D321AA17D0600B3CA0AB04" or SHA1 startswith "539C228B6B332F5AA523E5CE358C16647D8BBE57" or SHA256 startswith "E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173")

Elastic

Elastic Lucene (ECS)Hunting query

Lucene query over ECS fields (Winlogbeat/Elastic Agent Windows mappings). A detection rule also needs an index pattern, schedule and actions.

process.executable:*\\gmer.exe OR (winlog.event_data.Hashes:(*MD5\=E9DC058440D321AA17D0600B3CA0AB04* OR *SHA1\=539C228B6B332F5AA523E5CE358C16647D8BBE57* OR *SHA256\=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173*))

Elastic EQL (ECS)Hunting query

EQL query over ECS fields. Usable in an Elastic Security EQL rule after review; index pattern and schedule are set per environment.

any where process.executable:"*\\gmer.exe" or (winlog.event_data.Hashes like~ ("*MD5=E9DC058440D321AA17D0600B3CA0AB04*", "*SHA1=539C228B6B332F5AA523E5CE358C16647D8BBE57*", "*SHA256=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173*"))

Elastic ES|QL (ECS)Hunting query

ES|QL query over ECS fields; the FROM clause uses * and must be narrowed to your indices.

from * metadata _id, _index, _version | where ends_with(process.executable, "\\gmer.exe") or winlog.event_data.Hashes like "*MD5=E9DC058440D321AA17D0600B3CA0AB04*" or winlog.event_data.Hashes like "*SHA1=539C228B6B332F5AA523E5CE358C16647D8BBE57*" or winlog.event_data.Hashes like "*SHA256=E8A3E804A96C716A3E9B69195DB6FFB0D33E2433AF871E4D4E1EAB3097237173*"

Required telemetry

Log source
product: windows · category: process_creation
Fields used
Hashes Image

False positives

  • Unlikely

Investigation and response

No OffSet7 investigation guidance has been written for this rule yet. Start from the false positives above and the ATT&CK technique pages.

Author and attribution

Author
Nasreddine Bencherchali (Nextron Systems)
Source
SigmaHQ · rules/windows/process_creation/proc_creation_win_hktl_gmer.yml
Upstream commit
9688134317a2
Licence
Detection Rule License (DRL) 1.1

Version history

  1. Version 1Imported from SigmaHQ
  2. OffSet7 build · SigmaHQ 9688134317a2

Related rules