Uncommon PowerShell HostApplication Values in Windows PowerShell Start Logs

Detects PowerShell classic start events with unusual HostApplication values that may indicate evasion of powershell.exe-focused detections.

FreeReviewedSigma · Medium · v5
Product
windows
Category
ps_classic_start
Author
Roberto Rodriguez @Cyb3rWard0g (SigmaHQ), DRL 1.1
Published
2019-08-11
Updated
2026-07-31
title: Uncommon PowerShell HostApplication Values in Windows PowerShell Start Logs
id: 9343952f-0fe0-41ef-9758-a2eeab07aee8
related:
  - id: 64e8e417-c19a-475a-8d19-98ea705394cc
    type: derived
  - id: d7326048-328b-4d5e-98af-86e84b17c765
    type: derived
status: test
description: This rule flags PowerShell startup events where the recorded HostApplication value does not match common PowerShell interpreter paths or simple 'powershell' invocations. Attackers may use alternate host application strings to evade detections that only look for the standard powershell.exe invocation. The detection relies on Windows PowerShell classic start telemetry containing a Data field with 'HostApplication=' entries.
references:
  - https://threathunterplaybook.com/hunts/windows/190815-RemoteServiceInstallation/notebook.html
  - https://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/powershell/powershell_classic/posh_pc_alternate_powershell_hosts.yml
author: Roberto Rodriguez @Cyb3rWard0g, Huntrule Team
date: 2019-08-11
modified: 2025-10-22
tags:
  - attack.execution
  - attack.t1059.001
  - detection.threat-hunting
logsource:
  product: windows
  category: ps_classic_start
detection:
  selection:
    Data|contains: HostApplication=
  filter_main_ps:
    Data|contains:
      - HostApplication=?:/Windows/System32/WindowsPowerShell/v1.0/powershell
      - HostApplication=?:/Windows/SysWOW64/WindowsPowerShell/v1.0/powershell
      - HostApplication=?:\Windows\System32\sdiagnhost.exe
      - HostApplication=?:\Windows\System32\WindowsPowerShell\v1.0\powershell
      - HostApplication=?:\Windows\SysWOW64\sdiagnhost.exe
      - HostApplication=?:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell
      - HostApplication=powershell
  filter_optional_citrix:
    Data|contains: Citrix\ConfigSync\ConfigSync.ps1
  filter_optional_hexnode:
    Data|contains: HostApplication=C:\Hexnode\Hexnode Agent\Current\HexnodeAgent.exe
  condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
  - Programs using PowerShell directly without invocation of a dedicated interpreter
  - MSP Detection Searcher
  - Citrix ConfigSync.ps1
level: medium
license: DRL-1.1