text code block:web where event.dataset == "o365.audit" and event.provider == "SharePoint" and event.action == "SearchQueryPerformed" and event.outcome == "success" and o365.audit.SearchQueryText != null and o365.audit.SearchQueryText != "" and o365.audit.SearchQueryText like~ ( /* Credentials and Secrets */ "*password*", "*credential*", "*secret*", "*api key*", "*apikey*", "*token*", "*private key*", "*certificate*", "*ssh*", "*aws*", "*azure*", "*gcp*", "*oauth*", "*bearer*", "*connection string*", "*access key*", "*secret key*", /* Financial */ "*salary*", "*payroll*", "*compensation*", "*budget*", "*revenue*", "*financial*", "*banking*", "*invoice*", "*wire transfer*", "*account number*", "*credit card*", "*routing number*", "*profit*", "*expense*", "*1099*", /* Legal and Compliance */ "*confidential*", "*privileged*", "*attorney*", "*legal hold*", "*settlement*", "*contract*", "*nda*", "*merger*", "*acquisition*", "*litigation*", "*subpoena*", "*trade secret*", "*intellectual property*", "*proprietary*", "*internal*", "*proposal*", "*poc*", /* HR and PII */ "*ssn*", "*social security*", "*employee*", "*personnel*", "*performance review*", "*termination*", "*tax*", "*w2*", "*benefits*", "*background check*", "*medical*", "*hipaa*", "*passport*", "*driver license*", "*dob*", /* Infrastructure and IT */ "*admin*", "*root*", "*vpn*", "*firewall*", "*network diagram*", "*architecture*", "*topology*", "*production*", "*database*", "*config*", "*backup*", "*disaster recovery*", "*vulnerability*", "*pentest*", "*security audit*", "*salesforce*" )
Install detection rules in Elastic Security
Detect M365 SharePoint Search for Sensitive Content 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).