O365 Suspicious Rights Delegation

Original Source: [splunk source]
Name:O365 Suspicious Rights Delegation
id:b25d2973-303e-47c8-bacd-52b61604c6a7
version:3
date:2024-10-17
author:Patrick Bareiss, Mauricio Velazco, Splunk
status:deprecated
type:TTP
Description:**DEPRECATION NOTE** - This search has been deprecated and replaced with `O365 Elevated Mailbox Permission Assigned`. This analytic identifies instances where potentially suspicious rights are delegated within the Office 365 environment. Specifically, it detects when a user is granted FullAccess, SendAs, or SendOnBehalf permissions on another users mailbox. Such permissions can allow a user to access, send emails from, or send emails on behalf of the target mailbox. The detection leverages O365 audit logs, focusing on the Add-MailboxPermission operation. By parsing the parameters of this operation, the analytic filters for events where FullAccess, SendAs, or SendOnBehalf rights are granted. It then aggregates this data to capture the source user (who was granted the permissions), the destination user (whose mailbox was affected), the specific operation, and the type of access rights granted. Delegating mailbox rights, especially those as powerful as FullAccess, can pose significant security risks. While there are legitimate scenarios for these permissions, such as an executive assistant needing access to an executives mailbox, there are also malicious scenarios where an attacker or a compromised insider might grant themselves unauthorized access to sensitive mailboxes. Monitoring for these permissions changes is crucial to detect potential insider threats, compromised accounts, or other malicious activities.If the detection is a true positive, it indicates that a user has been granted potentially high-risk permissions on another users mailbox. This could lead to unauthorized access to sensitive emails, impersonation through sending emails as or on behalf of the mailbox owner, or data manipulation by altering or deleting emails. Immediate investigation is required to validate the legitimacy of the permission change and to assess the potential risks associated with the granted access.
Data_source:
search:`o365_management_activity` Operation=Add-MailboxPermission
| spath input=Parameters
| rename User AS src_user, Identity AS dest_user
| search AccessRights=FullAccess OR AccessRights=SendAs OR AccessRights=SendOnBehalf
| stats count earliest(_time) as firstTime latest(_time) as lastTime by user src_user dest_user Operation AccessRights |`security_content_ctime(firstTime)` |`security_content_ctime(lastTime)` |`o365_suspicious_rights_delegation_filter`


how_to_implement:You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events.
known_false_positives:While there are legitimate scenarios for these permissions, such as an executive assistant needing access to an executive's mailbox, there are also malicious scenarios. Investigate and filter as needed.
References:
  -https://www.mandiant.com/resources/blog/remediation-and-hardening-strategies-for-microsoft-365-to-defend-against-unc2452
  -https://attack.mitre.org/techniques/T1098/002/
  -https://attack.mitre.org/techniques/T1114/002/
drilldown_searches:
  :
tags:
  analytic_story:
    - 'Office 365 Collection Techniques'
  asset_type:O365 Tenant
  confidence:60
  impact:80
  message:User $user$ has delegated suspicious rights $AccessRights$ to user $dest_user$ that allow access to sensitive
  mitre_attack_id:
    - 'T1114.002'
    - 'T1114'
    - 'T1098.002'
    - 'T1098'
  observable:
    name:'user'
    type:'User'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'Operation'
    - 'Parameters'
  risk_score:48
  security_domain:threat

tests:
name:'True Positive Test'
 attack_data:
  data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1114.002/suspicious_rights_delegation/suspicious_rights_delegation.json
  sourcetype: o365:management:activity
  source: o365
manual_test:None

Related Analytic Stories


Office 365 Collection Techniques