Microsoft 365 Potential ransomware activity
Identifies when Microsoft Cloud App Security reports that a user has uploaded files to the cloud that might be infected with ransomware.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/07/15"
3integration = ["o365"]
4maturity = "production"
5updated_date = "2025/01/15"
6
7[rule]
8author = ["Austin Songer"]
9description = """
10Identifies when Microsoft Cloud App Security reports that a user has uploaded files to the cloud that might be infected
11with ransomware.
12"""
13false_positives = [
14 """
15 If Cloud App Security identifies, for example, a high rate of file uploads or file deletion activities it may
16 represent an adverse encryption process.
17 """,
18]
19from = "now-30m"
20index = ["filebeat-*", "logs-o365*"]
21language = "kuery"
22license = "Elastic License v2"
23name = "Microsoft 365 Potential ransomware activity"
24note = """## Triage and analysis
25
26> **Disclaimer**:
27> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
28
29### Investigating Microsoft 365 Potential ransomware activity
30
31Microsoft 365's cloud services can be exploited by adversaries to distribute ransomware by uploading infected files. This detection rule leverages Microsoft Cloud App Security to identify suspicious uploads, focusing on successful events flagged as potential ransomware activity. By monitoring specific event datasets and actions, it helps security analysts pinpoint and mitigate ransomware threats, aligning with MITRE ATT&CK's impact tactics.
32
33### Possible investigation steps
34
35- Review the event details in the Microsoft Cloud App Security console to confirm the specific files and user involved in the "Potential ransomware activity" alert.
36- Check the event.dataset field for o365.audit logs to gather additional context about the user's recent activities and any other related events.
37- Investigate the event.provider field to ensure the alert originated from the SecurityComplianceCenter, confirming the source of the detection.
38- Analyze the event.category field to verify that the activity is categorized as web, which may indicate the method of file upload.
39- Assess the user's recent activity history and permissions to determine if the upload was intentional or potentially malicious.
40- Contact the user to verify the legitimacy of the uploaded files and gather any additional context or explanations for the activity.
41- If the files are confirmed or suspected to be malicious, initiate a response plan to contain and remediate any potential ransomware threat, including isolating affected systems and notifying relevant stakeholders.
42
43### False positive analysis
44
45- Legitimate file uploads by trusted users may trigger alerts if the files are mistakenly flagged as ransomware. To manage this, create exceptions for specific users or groups who frequently upload large volumes of files.
46- Automated backup processes that upload encrypted files to the cloud can be misidentified as ransomware activity. Exclude these processes by identifying and whitelisting the associated service accounts or IP addresses.
47- Certain file types or extensions commonly used in business operations might be flagged. Review and adjust the detection rule to exclude these file types if they are consistently identified as false positives.
48- Collaborative tools that sync files across devices may cause multiple uploads that appear suspicious. Monitor and exclude these tools by recognizing their typical behavior patterns and adjusting the rule settings accordingly.
49- Regularly review and update the list of exceptions to ensure that only verified non-threatening activities are excluded, maintaining the balance between security and operational efficiency.
50
51### Response and remediation
52
53- Immediately isolate the affected user account to prevent further uploads and potential spread of ransomware within the cloud environment.
54- Quarantine the uploaded files flagged as potential ransomware to prevent access and further distribution.
55- Conduct a thorough scan of the affected user's devices and cloud storage for additional signs of ransomware or other malicious activity.
56- Notify the security operations team to initiate a deeper investigation into the source and scope of the ransomware activity, leveraging MITRE ATT&CK techniques for guidance.
57- Restore any affected files from secure backups, ensuring that the backups are clean and free from ransomware.
58- Review and update access controls and permissions for the affected user and related accounts to minimize the risk of future incidents.
59- Escalate the incident to senior security management and, if necessary, involve legal or compliance teams to assess any regulatory implications.
60
61## Setup
62
63The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
64"""
65references = [
66 "https://docs.microsoft.com/en-us/cloud-app-security/anomaly-detection-policy",
67 "https://docs.microsoft.com/en-us/cloud-app-security/policy-template-reference",
68]
69risk_score = 47
70rule_id = "721999d0-7ab2-44bf-b328-6e63367b9b29"
71severity = "medium"
72tags = ["Domain: Cloud", "Data Source: Microsoft 365", "Use Case: Configuration Audit", "Tactic: Impact", "Resources: Investigation Guide"]
73timestamp_override = "event.ingested"
74type = "query"
75
76query = '''
77event.dataset:o365.audit and event.provider:SecurityComplianceCenter and event.category:web and event.action:"Potential ransomware activity" and event.outcome:success
78'''
79
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83[[rule.threat.technique]]
84id = "T1486"
85name = "Data Encrypted for Impact"
86reference = "https://attack.mitre.org/techniques/T1486/"
87
88
89[rule.threat.tactic]
90id = "TA0040"
91name = "Impact"
92reference = "https://attack.mitre.org/tactics/TA0040/"
Triage and analysis
Disclaimer: This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance. While every effort has been made to ensure its quality, we recommend validating the content and adapting it to suit your specific environment and operational needs.
Investigating Microsoft 365 Potential ransomware activity
Microsoft 365's cloud services can be exploited by adversaries to distribute ransomware by uploading infected files. This detection rule leverages Microsoft Cloud App Security to identify suspicious uploads, focusing on successful events flagged as potential ransomware activity. By monitoring specific event datasets and actions, it helps security analysts pinpoint and mitigate ransomware threats, aligning with MITRE ATT&CK's impact tactics.
Possible investigation steps
- Review the event details in the Microsoft Cloud App Security console to confirm the specific files and user involved in the "Potential ransomware activity" alert.
- Check the event.dataset field for o365.audit logs to gather additional context about the user's recent activities and any other related events.
- Investigate the event.provider field to ensure the alert originated from the SecurityComplianceCenter, confirming the source of the detection.
- Analyze the event.category field to verify that the activity is categorized as web, which may indicate the method of file upload.
- Assess the user's recent activity history and permissions to determine if the upload was intentional or potentially malicious.
- Contact the user to verify the legitimacy of the uploaded files and gather any additional context or explanations for the activity.
- If the files are confirmed or suspected to be malicious, initiate a response plan to contain and remediate any potential ransomware threat, including isolating affected systems and notifying relevant stakeholders.
False positive analysis
- Legitimate file uploads by trusted users may trigger alerts if the files are mistakenly flagged as ransomware. To manage this, create exceptions for specific users or groups who frequently upload large volumes of files.
- Automated backup processes that upload encrypted files to the cloud can be misidentified as ransomware activity. Exclude these processes by identifying and whitelisting the associated service accounts or IP addresses.
- Certain file types or extensions commonly used in business operations might be flagged. Review and adjust the detection rule to exclude these file types if they are consistently identified as false positives.
- Collaborative tools that sync files across devices may cause multiple uploads that appear suspicious. Monitor and exclude these tools by recognizing their typical behavior patterns and adjusting the rule settings accordingly.
- Regularly review and update the list of exceptions to ensure that only verified non-threatening activities are excluded, maintaining the balance between security and operational efficiency.
Response and remediation
- Immediately isolate the affected user account to prevent further uploads and potential spread of ransomware within the cloud environment.
- Quarantine the uploaded files flagged as potential ransomware to prevent access and further distribution.
- Conduct a thorough scan of the affected user's devices and cloud storage for additional signs of ransomware or other malicious activity.
- Notify the security operations team to initiate a deeper investigation into the source and scope of the ransomware activity, leveraging MITRE ATT&CK techniques for guidance.
- Restore any affected files from secure backups, ensuring that the backups are clean and free from ransomware.
- Review and update access controls and permissions for the affected user and related accounts to minimize the risk of future incidents.
- Escalate the incident to senior security management and, if necessary, involve legal or compliance teams to assess any regulatory implications.
Setup
The Office 365 Logs Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule.
References
Related rules
- Microsoft 365 Unusual Volume of File Deletion
- Microsoft 365 Exchange Anti-Phish Policy Deletion
- Microsoft 365 Exchange Anti-Phish Rule Modification
- Microsoft 365 Exchange DLP Policy Removed
- Microsoft 365 Exchange Malware Filter Policy Deletion