Detection rule
WMIC Remote Command Execution
Overview
Detects the execution of WMIC to query information on a remote system
- Rule id
7773b877-5abb-4a3e-b9c9-fd0369b59b00- ATT&CK techniques
- T1047 Windows Management Instrumentation
- Severity
- Medium
- Confidence
- Low
- Origin
- SigmaHQ (community)
- SigmaHQ status
test- Used in defense packs
- The Gentlemen, INC Ransom, Akira, safepay, nightspire
Validation
- ExperimentalSyntax checked only. Not yet tested on events.
- Test-data validatedMatched positive test events and ignored near-miss events. Not yet run in a production SIEM.
- SIEM-validatedRun in a real SIEM, with a recorded result.
2 of 2 positive test events matched; 3 of 3 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) · 7773b877-5abb-4a3e-b9c9-fd0369b59b00
title: WMIC Remote Command Execution
id: 7773b877-5abb-4a3e-b9c9-fd0369b59b00
related:
- id: e42af9df-d90b-4306-b7fb-05c863847ebd
type: obsolete
- id: 09af397b-c5eb-4811-b2bb-08b3de464ebf
type: obsolete
status: test
description: Detects the execution of WMIC to query information on a remote system
references:
- https://securelist.com/moonbounce-the-dark-side-of-uefi-firmware/105468/
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/wmic
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2023-02-14
modified: 2025-10-22
tags:
- attack.execution
- attack.t1047
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\WMIC.exe'
- OriginalFileName: 'wmic.exe'
selection_cli:
CommandLine|contains|windash: '/node:'
filter_main_localhost:
CommandLine|contains:
- 'localhost'
- '127.0.0.1'
condition: all of selection_* and not 1 of filter_main_*
falsepositives:
- Unknown
level: medium
simulation:
- type: atomic-red-team
name: WMI Execute Remote Process
technique: T1047
atomic_guid: 9c8ef159-c666-472f-9874-90c8d60d136b
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_wmic_remote_execution/info.ymlQRadar 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 '%\wmic.exe' OR LOWER("Process Name") LIKE '%\wmic.exe') OR Filename='wmic.exe') AND (LOWER(Command) LIKE '%-node:%' OR LOWER(Command) LIKE '%/node:%' OR LOWER(Command) LIKE '%–node:%' OR LOWER(Command) LIKE '%—node:%' OR LOWER(Command) LIKE '%―node:%')) AND (NOT((LOWER(Command) LIKE '%localhost%' OR LOWER(Command) LIKE '%127.0.0.1%')))QRadar CRE
Design for the QRadar Rule Wizard. It is not importable and has not been tested in QRadar.
- Rule name
OffSet7: WMIC Remote Command 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:WMIC Remote Command Execution:selection_img(match)Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.Process Path / Process Nameends with:\WMIC.exeFilenameis equal to (case-insensitive):wmic.exe
BB:OffSet7:WMIC Remote Command Execution:selection_cli(match)All test lines must match (AND).Commandcontains:/node:
BB:OffSet7:WMIC Remote Command Execution:filter_main_localhost(exclusion)All test lines must match (AND).Commandcontains:localhost,127.0.0.1
Main rule, option A (building blocks)
- 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 - when an event matches the condition built from these building blocks:
(ALL of [BB:OffSet7:WMIC Remote Command Execution:selection_img, BB:OffSet7:WMIC Remote Command Execution:selection_cli]) AND NOT (ANY of [BB:OffSet7:WMIC Remote Command Execution:filter_main_localhost])
Main rule, option B (AQL filter test)
- when the event matches this AQL filter query:
devicetype=12 AND (((LOWER("Process Path") LIKE '%\wmic.exe' OR LOWER("Process Name") LIKE '%\wmic.exe') OR Filename='wmic.exe') AND (LOWER(Command) LIKE '%-node:%' OR LOWER(Command) LIKE '%/node:%' OR LOWER(Command) LIKE '%–node:%' OR LOWER(Command) LIKE '%—node:%' OR LOWER(Command) LIKE '%―node:%')) AND (NOT((LOWER(Command) LIKE '%localhost%' OR LOWER(Command) LIKE '%127.0.0.1%')))
Rule response
- Severity 5, 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="*\\WMIC.exe" OR OriginalFileName="wmic.exe") (CommandLine="*-node:*" OR CommandLine="*/node:*" OR CommandLine="*–node:*" OR CommandLine="*—node:*" OR CommandLine="*―node:*") NOT (CommandLine IN ("*localhost*", "*127.0.0.1*"))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
[WMIC Remote Command Execution]
description = Detects the execution of WMIC to query information on a remote system
search = (Image="*\\WMIC.exe" OR OriginalFileName="wmic.exe") (CommandLine="*-node:*" OR CommandLine="*/node:*" OR CommandLine="*–node:*" OR CommandLine="*—node:*" OR CommandLine="*―node:*") NOT (CommandLine IN ("*localhost*", "*127.0.0.1*"))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 "\\WMIC.exe" or TargetProcessFileOriginalName =~ "wmic.exe") and (TargetProcessCommandLine contains "-node:" or TargetProcessCommandLine contains "/node:" or TargetProcessCommandLine contains "–node:" or TargetProcessCommandLine contains "—node:" or TargetProcessCommandLine contains "―node:")) and (not((TargetProcessCommandLine contains "localhost" or TargetProcessCommandLine contains "127.0.0.1")))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 "\\WMIC.exe" or ProcessVersionInfoOriginalFileName =~ "wmic.exe") and (ProcessCommandLine contains "-node:" or ProcessCommandLine contains "/node:" or ProcessCommandLine contains "–node:" or ProcessCommandLine contains "—node:" or ProcessCommandLine contains "―node:")) and (not((ProcessCommandLine contains "localhost" or ProcessCommandLine contains "127.0.0.1")))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:*\\WMIC.exe OR process.pe.original_file_name:wmic.exe) AND process.command_line:(*\-node\:* OR *\/node\:* OR *–node\:* OR *—node\:* OR *―node\:*)) AND (NOT (process.command_line:(*localhost* OR *127.0.0.1*)))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:"*\\WMIC.exe" or process.pe.original_file_name:"wmic.exe") and process.command_line like~ ("*-node:*", "*/node:*", "*–node:*", "*—node:*", "*―node:*")) and (not (process.command_line like~ ("*localhost*", "*127.0.0.1*")))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, "\\WMIC.exe") or process.pe.original_file_name=="wmic.exe") and (process.command_line like "*-node:*" or process.command_line like "*/node:*" or process.command_line like "*–node:*" or process.command_line like "*—node:*" or process.command_line like "*―node:*") and not (process.command_line like "*localhost*" or process.command_line like "*127.0.0.1*")Required telemetry
- Log source
product: windows · category: process_creation- Fields used
CommandLineImageOriginalFileName
False positives
- Unknown
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.
References
Author and attribution
- Author
- frack113, Nasreddine Bencherchali (Nextron Systems)
- Source
- SigmaHQ ·
rules/windows/process_creation/proc_creation_win_wmic_remote_execution.yml - Upstream commit
9688134317a2- Licence
- Detection Rule License (DRL) 1.1
Version history
- Version 1Imported from SigmaHQ
- OffSet7 build · SigmaHQ
9688134317a2