Sharepoint
Adversaries may leverage SharePoint repositories as a source to mine valuable organizational information. SharePoint frequently contains policies, physical and logical network diagrams, system architecture documentation, testing credentials embedded in documents, source code snippets, and links to internal resources. Threat actors including Akira, HAFNIUM, LAPSUS$, APT28, and Chimera have used compromised credentials to bulk-access SharePoint sites during the collection phase, often prior to exfiltration. Specialized tooling such as spwebmember (used by APT15/Ke3chang) automates enumeration and bulk dumping of SharePoint document libraries.
let BulkAccessThreshold = 30;
let SensitiveKeywords = dynamic(["password", "credential", "secret", "vpn", "network diagram", "architecture", "topology", "firewall", "infrastructure", "source code", "api key", "private key", "token", "certificate", "backup"]);
let LookbackWindow = 24h;
let BucketSize = 1h;
OfficeActivity
| where TimeGenerated > ago(LookbackWindow)
| where RecordType in ("SharePointFileOperation", "SharePoint", "SharePointListItemOperation", "SharePointSearch")
| where Operation in (
"FileAccessed", "FileDownloaded", "FileAccessedExtended",
"FilePreviewed", "FolderBrowsed", "SearchQueryPerformed",
"ListItemAccessed", "PageViewed"
)
| extend IsSensitiveFile = SourceFileName has_any (SensitiveKeywords)
| extend IsSearchOperation = Operation == "SearchQueryPerformed"
| summarize
TotalEvents = count(),
FilesAccessed = dcountif(SourceFileName, not(IsSearchOperation)),
SearchesExecuted = countif(IsSearchOperation),
SensitiveFileHits = countif(IsSensitiveFile),
UniqueShareSites = dcount(Site_Url),
SiteList = make_set(Site_Url, 10),
OperationTypes = make_set(Operation),
UserAgentSample = take_any(UserAgent),
Earliest = min(TimeGenerated),
Latest = max(TimeGenerated)
by UserId, ClientIP, bin(TimeGenerated, BucketSize)
| where TotalEvents > BulkAccessThreshold or SensitiveFileHits > 3
| extend SessionDuration = Latest - Earliest
| extend RatePerMinute = round(toreal(TotalEvents) / max_of(toreal(datetime_diff('minute', Latest, Earliest)), 1), 1)
| project
TimeGenerated, UserId, ClientIP,
TotalEvents, FilesAccessed, SearchesExecuted, SensitiveFileHits,
UniqueShareSites, SiteList, OperationTypes,
SessionDuration, RatePerMinute, UserAgentSample
| sort by SensitiveFileHits desc, TotalEvents desc Data Sources
Required Tables
False Positives
- SharePoint site migrations or bulk content audits performed by IT administrators accessing large numbers of files in a short window
- Automated backup or archiving tools (e.g., AvePoint, ShareGate, Veeam for Microsoft 365) that enumerate and download SharePoint content on a schedule
- SharePoint crawlers and search indexers used by enterprise search products (Coveo, Microsoft Search, Elastic Workplace Search) that systematically access all content
- Legal hold or eDiscovery processing tools (Purview, Nuix, Exterro) that access large document sets during compliance reviews
- Power Automate flows or Logic Apps that process SharePoint file libraries at high volume for business automation workflows
References (11)
- https://attack.mitre.org/techniques/T1213/002/
- https://support.office.com/en-us/article/configure-audit-settings-for-a-site-collection-a9920c97-38c0-44f2-8bcb-4cf1e2ae22d2
- https://learn.microsoft.com/en-us/microsoft-365/compliance/audit-log-activities
- https://learn.microsoft.com/en-us/azure/sentinel/connect-office-365
- https://www.microsoft.com/en-us/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/
- https://www.nccgroup.com/uk/about-us/newsroom-and-events/blogs/2021/january/chimera-apt-group/
- https://www.secureworks.com/research/gold-sahara
- https://www.microsoft.com/en-us/security/blog/2025/03/05/silk-typhoon-targeting-it-supply-chain/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1213.002/T1213.002.md
- https://pnp.github.io/powershell/
- https://learn.microsoft.com/en-us/graph/api/resources/search-api-overview
Unlock Pro Content
Get the full detection package for T1213.002 including response playbook, investigation guide, and atomic red team tests.