Detectionmediumtest
Alternate PowerShell Hosts - PowerShell Module
Detects alternate PowerShell hosts potentially bypassing detections looking for powershell.exe
Convert In Phoenix Studio
Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.
Launch
Roberto Rodriguez (Cyb3rWard0g)Created Sun Aug 11Updated Fri Oct 1764e8e417-c19a-475a-8d19-98ea705394ccwindows
Log Source
WindowsPowerShell Module
ProductWindows← raw: windows
CategoryPowerShell Module← raw: ps_module
Definition
0ad03ef1-f21b-4a79-8ce8-e6900c54b65b
Detection Logic
Detection Logic7 selectors
detection:
selection:
ContextInfo|contains: '*'
filter_powershell:
# This filter covers the following use cases
# - When powershell is called directly from commandline via keyword powershell or powershell.exe
# - Or called via path but not with full "".exe". Example: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell
ContextInfo|contains:
- '= powershell' # Host Application=...powershell.exe or Application hote=...powershell.exe in French Win10 event
- '= C:\Windows\System32\WindowsPowerShell\v1.0\powershell'
- '= C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell'
# In some cases powershell was invoked with inverted slashes
- '= C:/Windows/System32/WindowsPowerShell/v1.0/powershell'
- '= C:/Windows/SysWOW64/WindowsPowerShell/v1.0/powershell'
# In some cases \??\C:.. is used
- '= \\\?\?\C:Windows\System32\WindowsPowerShell\v1.0\powershell'
- '= \\\?\?\C:Windows\SysWOW64\WindowsPowerShell\v1.0\powershell'
filter_sdiagnhost:
ContextInfo|contains: '= C:\WINDOWS\System32\sdiagnhost.exe -Embedding' # When MSDT is launched for example
filter_citrix:
ContextInfo|contains: 'ConfigSyncRun.exe'
filter_adace: # Active Directory Administrative Center Enhancements
ContextInfo|contains: 'C:\Windows\system32\dsac.exe'
filter_winrm:
ContextInfo|contains: 'C:\Windows\system32\wsmprovhost.exe -Embedding'
filter_help_update:
Payload|contains:
- 'Update-Help'
- 'Failed to update Help for the module'
condition: selection and not 1 of filter_*False Positives
Programs using PowerShell directly without invocation of a dedicated interpreter
MSP Detection Searcher
Citrix ConfigSync.ps1
MITRE ATT&CK
Tactics
Sub-techniques
Rule Metadata
Rule ID
64e8e417-c19a-475a-8d19-98ea705394cc
Status
test
Level
medium
Type
Detection
Created
Sun Aug 11
Modified
Fri Oct 17
Path
rules/windows/powershell/powershell_module/posh_pm_alternate_powershell_hosts.yml
Raw Tags
attack.executionattack.t1059.001