Defense Evasion (TA0005)(external, opens in a new tab or window)
text code block:event.dataset: "o365.audit" and event.provider: ("SharePoint" or "OneDrive") and event.action: "SharingPolicyChanged" and event.outcome: "success" and ( (o365.audit.ModifiedProperties.ShareWithGuests.NewValue: (true or "Enabled") and o365.audit.ModifiedProperties.ShareWithGuests.OldValue: (false or "Disabled")) or (o365.audit.ModifiedProperties.ShareUsingAnonymousLinks.NewValue: (true or "Enabled") and o365.audit.ModifiedProperties.ShareUsingAnonymousLinks.OldValue: (false or "Disabled")) or (o365.audit.ModifiedProperties.IsPublic.NewValue: (true or "Enabled") and o365.audit.ModifiedProperties.IsPublic.OldValue: (false or "Disabled")) or (o365.audit.ModifiedProperties.AllowGuestUser.NewValue: (true or "Enabled") and o365.audit.ModifiedProperties.AllowGuestUser.OldValue: (false or "Disabled")) or (o365.audit.ModifiedProperties.AllowFederatedUsers.NewValue: (true or "Enabled") and o365.audit.ModifiedProperties.AllowFederatedUsers.OldValue: (false or "Disabled")) or (o365.audit.ModifiedProperties.AllowTeamsConsumer.NewValue: (true or "Enabled") and o365.audit.ModifiedProperties.AllowTeamsConsumer.OldValue: (false or "Disabled")) )
Install detection rules in Elastic Security
Detect M365 SharePoint Site Sharing Policy Weakened in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).