Files
splunk-security_content/detections/endpoint/mailsniper_invoke_functions.yml
2023-08-21 13:50:31 -07:00

65 lines
2.4 KiB
YAML

name: Mailsniper Invoke functions
id: a36972c8-b894-11eb-9f78-acde48001122
version: 2
date: '2022-05-02'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: This search is to detect known mailsniper.ps1 functions executed in a
machine. This technique was seen in some attacker to harvest some sensitive e-mail
in a compromised exchange server.
data_source:
- Powershell 4104
search: '`powershell` EventCode=4104 ScriptBlockText IN ("*Invoke-GlobalO365MailSearch*",
"*Invoke-GlobalMailSearch*", "*Invoke-SelfSearch*", "*Invoke-PasswordSprayOWA*",
"*Invoke-PasswordSprayEWS*","*Invoke-DomainHarvestOWA*", "*Invoke-UsernameHarvestOWA*","*Invoke-OpenInboxFinder*","*Invoke-InjectGEventAPI*","*Invoke-InjectGEvent*","*Invoke-SearchGmail*",
"*Invoke-MonitorCredSniper*", "*Invoke-AddGmailRule*","*Invoke-PasswordSprayEAS*","*Invoke-UsernameHarvestEAS*")
| stats count min(_time) as firstTime max(_time) as lastTime by Opcode Computer
UserID EventCode ScriptBlockText | rename Computer as dest | rename UserID as user | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`
| `mailsniper_invoke_functions_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting
logs with the powershell logs from your endpoints. make sure you enable needed
registry to monitor this event.
known_false_positives: unknown
references:
- https://www.blackhillsinfosec.com/introducing-mailsniper-a-tool-for-searching-every-users-email-for-sensitive-data/
tags:
analytic_story:
- Data Exfiltration
asset_type: Endpoint
confidence: 80
impact: 90
message: mailsniper.ps1 functions $ScriptBlockText$ executed on a $dest$ by
user $user$.
mitre_attack_id:
- T1114
- T1114.001
observable:
- name: dest
type: Endpoint
role:
- Victim
- name: user
type: User
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- ScriptBlockText
- Opcode
- Computer
- UserID
- EventCode
risk_score: 72
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1059.001/powershell_script_block_logging/sbl_xml.log
source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
sourcetype: xmlwineventlog