|
| 1 | +name: O365 Email Password and Payroll Compromise Behavior |
| 2 | +id: e36de71a-6bdc-4002-98ff-e3e51b0d8f96 |
| 3 | +version: 1 |
| 4 | +date: '2025-01-20' |
| 5 | +author: Steven Dick |
| 6 | +status: production |
| 7 | +type: TTP |
| 8 | +description: The following analytic identifies when an O365 email recipient receives and then deletes emails for the combination of both password and banking/payroll changes within a short period. This behavior may indicate a compromised account where the threat actor is attempting to redirect the victims payroll to an attacker controlled bank account. |
| 9 | +data_source: |
| 10 | +- Office 365 Universal Audit Log |
| 11 | +- Office 365 Reporting Message Trace |
| 12 | +search: |- |
| 13 | + `o365_messagetrace` subject IN ("*banking*","*direct deposit*","*pay-to*","*password *","*passcode *","*OTP *","*MFA *","*Account Recovery*") |
| 14 | + | eval mailtime = _time |
| 15 | + | bin _time span=4hr |
| 16 | + | eval user = lower(RecipientAddress) |
| 17 | + | eval InternetMessageId = lower(MessageId) |
| 18 | + | join InternetMessageId, user max=0 |
| 19 | + [ |
| 20 | + | search `o365_management_activity` Workload=Exchange Operation IN ("SoftDelete","HardDelete") |
| 21 | + | spath path=AffectedItems{} output=AffectedItemSplit |
| 22 | + | fields _time,ClientIP,ClientInfoString,UserId,Operation,ResultStatus,MailboxOwnerUPN,AffectedItemSplit |
| 23 | + | mvexpand AffectedItemSplit | spath input=AffectedItemSplit |
| 24 | + | search Subject IN ("*banking*","*direct deposit*","*pay-to*","*password *","*passcode *","*OTP *","*MFA *","*Account Recovery*") |
| 25 | + | eval deltime = _time |
| 26 | + | bin _time span=4hr |
| 27 | + | eval InternetMessageId = lower(InternetMessageId), user = lower(UserId) |
| 28 | + ] |
| 29 | + | stats values(ClientInfoString) as http_user_agent, values(ClientIP) as src, values(Subject) as subject, dc(Subject) as subject_count, values(Operation) as action, values(ResultStatus) as result, count, min(mailtime) as firstTime, max(deltime) as lastTime by user,_time |
| 30 | + | search subject IN ("*banking*","*direct deposit*","*pay-to*") AND subject IN ("*password *","*passcode *","*OTP *","*MFA *","*Account Recovery*") |
| 31 | + | `security_content_ctime(firstTime)` |
| 32 | + | `security_content_ctime(lastTime)` |
| 33 | + | `o365_email_password_and_payroll_compromise_behavior_filter` |
| 34 | +how_to_implement: You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events AND Message Trace events. |
| 35 | +known_false_positives: Unknown, unlikely. |
| 36 | +references: |
| 37 | +- https://attack.mitre.org/techniques/T1114/ |
| 38 | +- https://www.hhs.gov/sites/default/files/help-desk-social-engineering-sector-alert-tlpclear.pdf |
| 39 | +- https://intelligence.abnormalsecurity.com/attack-library/threat-actor-convincingly-impersonates-employee-requesting-direct-deposit-update-in-likely-ai-generated-attack |
| 40 | +drilldown_searches: |
| 41 | +- name: View the detection results for - "$user$" |
| 42 | + search: '%original_detection_search% | search user = "$user$"' |
| 43 | + earliest_offset: $info_min_time$ |
| 44 | + latest_offset: $info_max_time$ |
| 45 | +- name: View risk events for the last 7 days for - "$user$" |
| 46 | + search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' |
| 47 | + earliest_offset: $info_min_time$ |
| 48 | + latest_offset: $info_max_time$ |
| 49 | +- name: Investigate Email for $user$ |
| 50 | + search: '`o365_messagetrace` subject IN ("*banking*","*direct deposit*","*password*","*passcode*") RecipientAddress = "$user$"' |
| 51 | + earliest_offset: $info_min_time$ |
| 52 | + latest_offset: $info_max_time$ |
| 53 | +rba: |
| 54 | + message: The user $user$ received and deleted password and payroll change emails within a short timeframe |
| 55 | + risk_objects: |
| 56 | + - field: user |
| 57 | + type: user |
| 58 | + score: 90 |
| 59 | + threat_objects: |
| 60 | + - field: src |
| 61 | + type: ip_address |
| 62 | +tags: |
| 63 | + analytic_story: |
| 64 | + - Office 365 Account Takeover |
| 65 | + - Office 365 Collection Techniques |
| 66 | + - Suspicious Emails |
| 67 | + - Data Destruction |
| 68 | + asset_type: O365 Tenant |
| 69 | + mitre_attack_id: |
| 70 | + - T1070.008 |
| 71 | + - T1485 |
| 72 | + - T1114.001 |
| 73 | + product: |
| 74 | + - Splunk Enterprise |
| 75 | + - Splunk Enterprise Security |
| 76 | + - Splunk Cloud |
| 77 | + security_domain: threat |
| 78 | +tests: |
| 79 | +- name: True Positive Test |
| 80 | + attack_data: |
| 81 | + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114/o365_suspect_email_actions/o365_exchange_suspect_events.log |
| 82 | + source: o365 |
| 83 | + sourcetype: o365:management:activity |
| 84 | + - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114/o365_suspect_email_actions/o365_messagetrace_suspect_events.log |
| 85 | + source: o365_messagetrace |
| 86 | + sourcetype: o365:reporting:messagetrace |
0 commit comments