Exchange PowerShell Snap-Ins Usage
Description
Detects adding and using Exchange PowerShell snap-ins to export mailbox data. As seen used by HAFNIUM and APT27
Query · sigma
selection_img:
- Image|endswith:
- \powershell.exe
- \pwsh.exe
- OriginalFileName:
- PowerShell.EXE
- pwsh.dll
selection_cli:
CommandLine|contains: Add-PSSnapin
selection_module:
CommandLine|contains:
- Microsoft.Exchange.Powershell.Snapin
- Microsoft.Exchange.Management.PowerShell.SnapIn
filter_msiexec:
ParentImage: C:\Windows\System32\msiexec.exe
CommandLine|contains: $exserver=Get-ExchangeServer ([Environment]::MachineName)
-ErrorVariable exerr 2> $null
condition: all of selection_* and not 1 of filter_*
Known false positives
- Unknown