Detection rules › Sigma

Powershell Executed From Headless ConHost Process

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
Matt Anderson (Huntress)
Source
github.com/SigmaHQ/sigma

Detects the use of powershell commands from headless ConHost window. The "--headless" flag hides the windows from the user upon execution.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Powershell Executed From Headless ConHost Process
id: 056c7317-9a09-4bd4-9067-d051312752ea
related:
    - id: 00ca75ab-d5ce-43be-b86c-55ff39c6abfc
      type: derived
status: test
description: |
    Detects the use of powershell commands from headless ConHost window.
    The "--headless" flag hides the windows from the user upon execution.
references:
    - https://www.huntress.com/blog/fake-browser-updates-lead-to-boinc-volunteer-computing-software
author: Matt Anderson (Huntress)
date: 2024-07-23
tags:
    - attack.execution
    - attack.stealth
    - attack.t1059.001
    - attack.t1059.003
    - attack.t1564.003
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\conhost.exe'
        - OriginalFileName: 'CONHOST.EXE'
    selection_cli:
        CommandLine|contains|all:
            - '--headless'
            - 'powershell'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_conhost_headless_powershell/info.yml

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\conhost.exe'
    - OriginalFileName: 'CONHOST.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains|all:
        - '--headless'
        - 'powershell'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • --headless corpus 8 (sigma 6, splunk 2)
  • powershell corpus 25 (sigma 24, chronicle 1)
Imageends_with
  • \conhost.exe corpus 4 (sigma 4)
OriginalFileNameeq
  • CONHOST.EXE corpus 2 (sigma 2)