Sigma rule: Exchange PowerShell Snap-Ins Usage
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-6479c9629a3d, updated 2023-03-24T00:00:00.000Z.
Rule
- Title
- Exchange PowerShell Snap-Ins Usage
- Status
- test
- Level
- high
- Author
- FPT.EagleEye, Nasreddine Bencherchali (Nextron Systems)
- Date
- 2021-03-03
- Modified
- 2023-03-24
- File
- rules/windows/process_creation/proc_creation_win_powershell_snapins_hafnium.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects adding and using Exchange PowerShell snap-ins to export mailbox data. As seen used by HAFNIUM and APT27
Log source
- product
- windows
- category
- process_creation
Detection
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:
# ParentCommandLine: C:\Windows\System32\MsiExec.exe -Embedding C9138ECE2536CB4821EB5F55D300D88E E Global\MSI0000
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_*False positives (as the rule lists them)
- Unknown
Tags
- attack.execution
- attack.t1059.001
- attack.collection
- attack.t1114
MITRE ATT&CK ids this rule names
References
- https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/
- https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/
- https://www.intrinsec.com/apt27-analysis/
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_snapins_hafnium.yml
Sources and licences
SigmaHQ
"Exchange PowerShell Snap-Ins Usage" by FPT.EagleEye, Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_powershell_snapins_hafnium.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Exchange PowerShell Snap-Ins Usage",
entity page, dataset version ref-6479c9629a3d, updated 2023-03-24T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/25676e10-2121-446e-80a4-71ff8506af47 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 25676e10-2121-446e-80a4-71ff8506af47, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.