← Back to SOC feed Coverage →

Wmiexec Default Output File

sigma CRITICAL SigmaHQ
T1047
imFileEvent
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T03:05:59Z · Confidence: medium

Hunt Hypothesis

The hypothesis is that an adversary is using wmiexec to execute commands and is leveraging the default output file to exfiltrate data or persist within the network. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential command and control activity or data exfiltration attempts.

Detection Rule

Sigma (Original)

title: Wmiexec Default Output File
id: 8d5aca11-22b3-4f22-b7ba-90e60533e1fb
status: test
description: Detects the creation of the default output filename used by the wmiexec tool
references:
    - https://www.crowdstrike.com/blog/how-to-detect-and-prevent-impackets-wmiexec/
    - https://github.com/fortra/impacket/blob/f4b848fa27654ca95bc0f4c73dbba8b9c2c9f30a/examples/wmiexec.py
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-02
modified: 2023-03-08
tags:
    - attack.lateral-movement
    - attack.execution
    - attack.t1047
logsource:
    category: file_event
    product: windows
detection:
    selection:
        - TargetFilename|re: '\\Windows\\__1\d{9}\.\d{1,7}$' # Admin$
        - TargetFilename|re: 'C:\\__1\d{9}\.\d{1,7}$' # C$
        - TargetFilename|re: 'D:\\__1\d{9}\.\d{1,7}$' # D$
    condition: selection
falsepositives:
    - Unlikely
level: critical

KQL (Azure Sentinel)

imFileEvent
| where TargetFileName matches regex "\\\\Windows\\\\__1\\d{9}\\.\\d{1,7}$" or TargetFileName matches regex "C:\\\\__1\\d{9}\\.\\d{1,7}$" or TargetFileName matches regex "D:\\\\__1\\d{9}\\.\\d{1,7}$"

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_wmiexec_default_filename.yml