Sigma rule: Potential Data Exfiltration Over SMTP Via Send-MailMessage Cmdlet
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-4aecc2badb63, updated 2024-11-01T00:00:00.000Z.
Rule
- Title
- Potential Data Exfiltration Over SMTP Via Send-MailMessage Cmdlet
- Status
- test
- Level
- medium
- Author
- frack113
- Date
- 2022-09-26
- Modified
- 2024-11-01
- File
- rules-threat-hunting/windows/powershell/powershell_script/posh_ps_send_mailmessage.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the execution of a PowerShell script with a call to the "Send-MailMessage" cmdlet along with the "-Attachments" flag. This could be a potential sign of data exfiltration via Email.
Adversaries may steal data by exfiltrating it over an un-encrypted network protocol other than that of the existing command and control channel. The data may also be sent to an alternate network location from the main command and control server.
Log source
- product
- windows
- category
- ps_script
- definition
- Requirements: Script Block Logging must be enabled
Detection
selection:
ScriptBlockText|contains: 'Send-MailMessage*-Attachments'
condition: selectionFalse positives (as the rule lists them)
- Unknown
Tags
- attack.exfiltration
- attack.t1048.003
- detection.threat-hunting
MITRE ATT&CK ids this rule names
References
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048.003/T1048.003.md#atomic-test-5---exfiltration-over-alternative-protocol---smtp
- https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/send-mailmessage?view=powershell-7.4
- https://www.ietf.org/rfc/rfc2821.txt
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-threat-hunting/windows/powershell/powershell_script/posh_ps_send_mailmessage.yml
Sources and licences
SigmaHQ
"Potential Data Exfiltration Over SMTP Via Send-MailMessage Cmdlet" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules-threat-hunting/windows/powershell/powershell_script/posh_ps_send_mailmessage.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: Potential Data Exfiltration Over SMTP Via Send-MailMessage Cmdlet",
entity page, dataset version ref-4aecc2badb63, updated 2024-11-01T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/9a7afa56-4762-43eb-807d-c3dc9ffe211b (accessed 2026-11-03).
Underlying source: SigmaHQ rule 9a7afa56-4762-43eb-807d-c3dc9ffe211b, 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.