The User Shared The File With Everyone
The file was not stolen. Nobody hacked the account. Nobody bypassed MFA. No malware alert fired.
The user simply clicked share, changed the permission, and created an anyone with the link access path.
This Agent Foskett briefing investigates one of the most common cloud security risks in Microsoft 365: sensitive SharePoint and OneDrive files exposed through broad sharing links, anonymous access, external recipients and permissions nobody reviewed until the file had already travelled further than expected.
Briefing summary
A file sharing incident is not always a breach in the traditional sense. Sometimes the risk begins with a normal Microsoft 365 feature used too broadly. GEMXIT looks at the link, the permission, the recipients and the telemetry trail.
What happened
The real issue was uncontrolled sharing
First hunt: recently created sharing links
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CloudAppEvents | where Timestamp > ago(30d) | where Application has_any ("SharePoint", "OneDrive") | where ActionType has_any ("Created sharing link", "SharingSet", "AnonymousLinkCreated") | project Timestamp, AccountDisplayName, AccountObjectId, ActionType, Application, ObjectName, IPAddress, RawEventData | order by Timestamp desc
Second hunt: files accessed or downloaded after sharing
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
CloudAppEvents | where Timestamp > ago(30d) | where Application has_any ("SharePoint", "OneDrive") | where ActionType has_any ("FileAccessed", "FileDownloaded", "FilePreviewed") | where ObjectName has "sensitive-file-name" | project Timestamp, AccountDisplayName, ActionType, IPAddress, Application, ObjectName, RawEventData | order by Timestamp desc
Third hunt: external users and unusual access patterns
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
CloudAppEvents | where Timestamp > ago(7d) | where Application has_any ("SharePoint", "OneDrive") | where ActionType has_any ("FileAccessed", "FileDownloaded", "FilePreviewed") | summarize Events = count(), Files = dcount(ObjectName), IPs = make_set(IPAddress) by AccountDisplayName, Application | where Events > 10 or Files > 5 | order by Events desc
Fourth hunt: broad sharing across the environment
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
CloudAppEvents | where Timestamp > ago(30d) | where Application has_any ("SharePoint", "OneDrive") | where ActionType has_any ("Created sharing link", "SharingSet", "AnonymousLinkCreated", "AddedToSecureLink") | summarize SharingEvents = count(), SharedObjects = dcount(ObjectName), Actions = make_set(ActionType) by AccountDisplayName, Application | order by SharingEvents desc
What should happen after a risky sharing link is found?
How GEMXIT approaches SharePoint and OneDrive security reviews
Final thought
It is: “Can we prove exactly who could access it, who did access it and whether that access still exists?”
Continue the investigation with The After-Hours Download, The Dashboard Was Green, The User Was Disabled But The Account Was Still Active, The Session Token Never Expired, Microsoft Security Services and the GEMXIT Security Review.
Develop IT. Protect IT. GEMXIT PTY LTD | GEMXIT UK LTD