Detection: O365 SharePoint Suspicious Search Behavior

Description

The following analytic identifies when the O365 SharePoint users search for suspicious keywords or have an excessive number of queries within a limited timeframe. This behavior may indicate malicious actor enumeration of SharePoint based data within O365.

 1`o365_management_activity` Workload=SharePoint Operation="SearchQueryPerformed" SearchQueryText=* EventData=*search*
 2
 3| where NOT (match(SearchQueryText, "\*") OR match(SearchQueryText,"(\*)"))
 4
 5| eval signature_id = CorrelationId, signature=Operation, src = ClientIP, user = UserId, object_name=EventData, command = SearchQueryText, -time = _time 
 6
 7| bin _time span=1hr
 8
 9| stats values(object_name) as object_name values(command) as command, values(src) as src, dc(command) as count, min(-time) as firstTime, max(-time) as lastTime by user,signature,_time
10
11| where count > 20 OR match(command, "(?i)password
12|credential
13|passwd
14|shadow
15|active directory
16|account
17|username
18|network
19|computer
20|access
21|MFA
22|bank
23|deposit
24|payroll
25|EFT
26|Electonic Funds
27|routing")
28
29| `security_content_ctime(firstTime)` 
30
31| `security_content_ctime(lastTime)`
32
33| `o365_sharepoint_suspicious_search_behavior_filter`

Data Source

No data sources specified for this detection.

Macros Used

Name Value
o365_management_activity sourcetype=o365:management:activity
o365_sharepoint_suspicious_search_behavior_filter search *
o365_sharepoint_suspicious_search_behavior_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1213.002 Sharepoint Collection
T1552 Unsecured Credentials Credential Access
Exploitation
DE.AE
CIS 10

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event True
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

You must install the Splunk Microsoft Office 365 Add-on and ingest Office 365 management activity events. The thresholds and match terms set within the analytic are initial guidelines and should be customized based on the organization's user behavior and risk profile. Security teams are encouraged to adjust these thresholds to optimize the balance between detecting genuine threats and minimizing false positives, ensuring the detection is tailored to their specific environment.

Known False Positives

Users searching excessively or possible false positives related to matching conditions.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

The SharePoint Online was searched suspiciously by $user$

Risk Object Risk Object Type Risk Score Threat Objects
user user 25 src

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset o365 o365:management:activity
Integration ✅ Passing Dataset o365 o365:management:activity

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 1