Agent Foskett Academy • SOC Analyst Academy • Module 6 • Lesson 56 • Cloud & SaaS Incidents

Lesson 56 — The Account Shared a Sensitive File Externally

The alert sounded serious.

A sensitive file had been shared outside the organisation.

The file contained commercial pricing information.
The recipient used an external email address.

Easy verdict?

Not yet.

External sharing can be legitimate business activity.
It can also be accidental exposure, compromised-account activity or deliberate data removal.

Agent Foskett opened the timeline.

“Before we call this exfiltration, who shared what with whom — and how?”

External sharing is an event. Exposure, intent and compromise require evidence.
Agent Foskett investigating external sharing of a sensitive cloud file
Sharing does not automatically equal exfiltration

Identify the file, sharing mechanism, recipient, identity context and actual access before reaching a verdict.

✓ Identify the file
✓ Identify the recipient
✓ Determine the sharing method
✓ Establish actual exposure

Case briefing

14:06 Sensitive file accessed 14:09 External sharing event FILE: FY27-Pricing-Strategy.xlsx ACCOUNT: maya@contoso.com EXTERNAL RECIPIENT: consultant@example.net 14:23 External access activity observed INITIAL QUESTION: Was this an approved collaboration? An accidental overshare? A compromised account? Or deliberate data removal?

Investigation objective

Determine what was shared, who initiated the sharing, who received access, which sharing mechanism was used, whether the external party actually accessed the data and whether the activity fits a legitimate business purpose.

Investigator's rule

Do not use “shared externally” and “data exfiltration” as synonyms. Establish exposure, access and context before assigning intent.

Stage 1 — locate the sharing activity

01-external-sharing-activity.kql
12345678
CloudAppEvents
| where Timestamp > ago(7d)
| where AccountId =~ "maya@contoso.com"
| where ActionType has_any ("Share", "Sharing", "AnonymousLink")
| project Timestamp,
          AccountId,
          Application,
          ActionType,
          IPAddress,
          UserAgent,
          RawEventData
| order by Timestamp asc

Inspect the underlying event

Exact action names and available properties vary with workload and telemetry. Preserve RawEventData so file, recipient, link and sharing details can be inspected where available.

Anchor the investigation

Record the exact sharing time. Then examine activity immediately before and after it rather than treating the share as an isolated event.

Stage 2 — identify exactly what was shared

SHARING EVENT ↓ FILE / OBJECT FY27-Pricing-Strategy.xlsx ↓ LOCATION SharePoint / Finance / Strategy ↓ OWNER Finance Team ↓ CLASSIFICATION / SENSITIVITY Commercially sensitive ↓ QUESTION: WHAT WOULD EXPOSURE OF THIS FILE MEAN?

The file matters as much as the event

A publicly available brochure and a confidential pricing workbook are not equivalent incidents. Establish the business sensitivity of the object involved.

Do not infer sensitivity from the filename alone

Use available labels, repository context, ownership and business confirmation. A dramatic filename is useful context, not proof of classification.

Stage 3 — determine how access was granted

Sharing mechanismInvestigation question
Specific external personWhich identity was granted access and was that recipient expected?
Guest accountWas an existing or newly created guest used?
Organisation-scoped linkWas access limited to authenticated organisational users?
Anonymous / anyone linkCould possession of the link allow access without a named recipient?
Existing permission changedWas an earlier sharing relationship expanded?

The mechanism changes the exposure

A named external recipient and a broadly accessible anonymous link create different scoping problems. Determine how access was granted before estimating impact.

Sharing created is not necessarily sharing used

The existence of a link or permission shows potential exposure. Look for evidence that the external party actually accessed the resource.

Stage 4 — investigate the identity that performed the share

13:51 — User sign-in ↓ 14:06 — Sensitive file opened ↓ 14:09 — External share created ↓ 14:12 — Additional cloud activity ↓ 14:23 — External access observed IDENTITY QUESTIONS: Expected device? Expected IP? Expected country? MFA context? Risk indicators? Normal working hours? Other unusual actions? New session or existing session?

Was Maya really Maya?

If the identity context is suspicious, the external sharing event may be part of an account-compromise investigation rather than a simple data-governance issue.

Normal authentication does not settle intent

A legitimate user can accidentally or deliberately share sensitive data. A valid session tells you about authentication context, not business justification.

Stage 5 — establish the user's sharing baseline

02-sharing-baseline.kql
1234567
CloudAppEvents
| where Timestamp > ago(30d)
| where AccountId =~ "maya@contoso.com"
| where ActionType has_any ("Share", "Sharing", "AnonymousLink")
| summarize Events = count(),
            Actions = make_set(ActionType, 50),
            Applications = make_set(Application, 20),
            FirstSeen = min(Timestamp),
            LastSeen = max(Timestamp)

Baseline behaviour provides context

If the user's role routinely involves external collaboration, sharing may be common. The important question becomes whether this recipient, file, mechanism and timing fit that normal pattern.

Rare does not mean malicious

A first-time external share can still be legitimate. Baselines help identify deviation; they do not provide the final verdict.

Stage 6 — investigate the recipient

RECIPIENT: consultant@example.net ASK: Known supplier or consultant? Existing business relationship? Previously invited guest? New external domain? Consumer email service? Lookalike domain? Approved project? Expected by file owner? Expected by manager / data owner? THE RECIPIENT IS PART OF THE EVIDENCE.

Business context is essential

A new external domain may be suspicious, or it may belong to a newly engaged consultant. Confirm the relationship through appropriate business channels.

Watch for lookalikes

A mistyped or deceptive recipient domain can turn a legitimate sharing intention into a real exposure. Compare the destination carefully with the expected organisation.

Stage 7 — determine whether the file was actually accessed

03-follow-the-file.kql
1234567
CloudAppEvents
| where Timestamp between
    (datetime(2026-09-03 14:00:00) ..
     datetime(2026-09-03 16:00:00))
| where RawEventData has "FY27-Pricing-Strategy.xlsx"
| project Timestamp,
          AccountId,
          Application,
          ActionType,
          IPAddress,
          RawEventData
| order by Timestamp asc

Follow the object, not only the user

Once a specific file becomes central to the case, pivot on that object through the available telemetry. This can reveal access occurring under a different identity context.

Exposure and access are separate findings

If sharing was created but no external access is observed, report potential exposure. If external access is confirmed, document that separately and continue scoping.

Stage 8 — expand the timeline

13:51 — Maya signs in 14:06 — Sensitive workbook opened 14:09 — External sharing created 14:10 — Permission / link available 14:23 — External access observed 14:26 — File downloaded? 14:31 — Additional files shared? 14:42 — Permission changed or removed? ↓ THE TIMELINE ANSWERS: WHO? WHAT? WHEN? HOW? WHO RECEIVED ACCESS? WAS THE DATA ACCESSED? WHAT HAPPENED NEXT?

Look beyond the first file

A single sensitive share may be isolated. Multiple external shares to the same destination can indicate a broader exposure pattern that needs tenant-wide scoping.

Look before the share too

Bulk file access, unusual searches or rapid navigation through sensitive repositories immediately before sharing can change the risk assessment.

Stage 9 — test competing hypotheses

HypothesisEvidence that may support it
Approved collaborationKnown recipient, documented business purpose, expected sharing method and data-owner approval.
Accidental exposureWrong recipient, incorrect link type or user confirms a sharing mistake.
Policy violationUser intentionally shared data for work but bypassed approved controls or process.
Account compromiseSuspicious identity/session evidence plus unexplained external sharing.
Potential insider activityAuthenticated user activity, unexplained collection/sharing and no legitimate business justification.

Intent is the hardest part

Telemetry can often prove that sharing occurred and that data was accessed. It may not prove why the user did it. Keep technical findings separate from unsupported attribution.

Use neutral investigation language

Prefer “external sharing inconsistent with known business context” over “the employee stole data” unless the wider investigation has established that conclusion.

Stage 10 — decide what needs containment

PRESERVE: Sharing event File identity / location Sensitivity context Recipient / domain Sharing mechanism Permission or link details Identity / session evidence External access evidence Related file activity Business justification THEN FOLLOW APPROVED PROCEDURES FOR: Removing external access Disabling risky links Identity containment if compromised Reviewing guest access Scoping additional shared files Data-owner / privacy escalation Incident documentation

Containment should match the finding

An accidental anonymous link may require link removal and exposure review. A compromised account may additionally require session and identity remediation. Do not treat every external share identically.

Preserve evidence first

Where procedures allow, capture the sharing relationship and relevant activity before permissions are removed so the incident can still be reconstructed accurately.

Stage 11 — write the SOC finding

SOC FINDING At 14:09, maya@contoso.com shared FY27-Pricing-Strategy.xlsx with an external recipient. The workbook is stored in a Finance strategy location and was confirmed by the data owner as commercially sensitive. The external recipient was not part of the approved project contact list. Cloud telemetry subsequently showed external access to the shared object. Identity review did not identify sufficient evidence to conclude that Maya's account was compromised. The activity should therefore be escalated as an unauthorised external data-sharing event while business and insider-risk context is reviewed. The technical evidence establishes sharing and external access. It does not, by itself, establish malicious intent.

Lesson 56 key takeaways

  • External sharing is not automatically data exfiltration.
  • Identify the exact file or object involved.
  • Establish its sensitivity using evidence and business context.
  • Determine how external access was granted.
  • Named recipients and anonymous links create different exposure scenarios.
  • Investigate the identity and session that performed the share.
  • Compare the event with the user's normal sharing behaviour.
  • Validate the external recipient and business relationship.
  • Separate permission creation from confirmed external access.
  • Pivot on the file to follow subsequent activity.
  • Test legitimate collaboration, accidental exposure, policy violation, account compromise and insider activity as competing hypotheses.
  • Do not assign malicious intent unless the evidence supports it.

Module 6 — Cloud & SaaS Incidents

Lesson 56 investigated a sensitive file shared outside the organisation. Lesson 57 removes endpoint evidence completely and asks the analyst to work an incident using cloud telemetry alone.

Next: Lesson 57 — The Cloud Alert Had No Endpoint Evidence

Continue your SOC Analyst training

Module 3 focuses on identity incidents, authentication, MFA, privilege, sessions and application access.

Investigate external file sharing in Microsoft 365

Lesson 56 of the Agent Foskett SOC Analyst Academy teaches analysts how to investigate sensitive files shared outside an organisation by identifying the object, recipient, sharing mechanism, identity context and subsequent external access.

Investigate SharePoint and OneDrive data exposure with Microsoft Defender XDR and KQL

Use CloudAppEvents and supporting Microsoft 365 evidence to distinguish legitimate collaboration, accidental exposure, policy violations, account compromise and potential insider activity while keeping technical evidence separate from unsupported attribution.