SOP-118: Microsoft Power Automate (Flow) Abuse for Exfiltration & Persistence Response

·

Power Automate (formerly Microsoft Flow) is a low-code automation platform bundled into every Microsoft 365 licence. Any standard user can build a cloud flow that reads their mailbox, their SharePoint sites, and their OneDrive, and sends that data anywhere a connector reaches — Gmail, Dropbox, an arbitrary HTTP endpoint, an attacker-owned SMTP account. After a Business Email Compromise (BEC) or token-theft intrusion, a threat actor who cannot keep a malicious inbox rule alive (those are hunted — see SOP-85) instead builds a flow: it survives password resets, survives session revocation of the interactive account, runs server-side in the cloud with no endpoint footprint, and re-fires every time a new mail arrives or on a timer. This is living-off-the-cloud persistence and silent exfiltration in one object.

Key data sources: OfficeActivity (Workload MicrosoftFlow — CreateFlow, EditFlow, PutConnection, EditPermissions), CloudAppEvents (Power Platform / Defender for Cloud Apps activity), AuditLogs (Entra — consent grants, DLP-policy change, environment role grant), and EmailEvents (the auto-forward side-effect of a mail-trigger flow). Treat a flow built by a recently-compromised or risky account that connects a mailbox/SharePoint trigger to an external destination as a confirmed persistence + exfiltration event.

☰ Table of Contents

01 Background 02 Identification 03 Containment 04 Eradication 05 Escalation
🛠

01 — BACKGROUND

TECHNIQUE OVERVIEW
01
Technique Overview — Flow Abuse
MITRE T1567 / T1098

A cloud flow has three parts: a trigger (when a new email arrives, when a file is created in SharePoint, a recurrence timer), one or more connections (Office 365 Outlook, SharePoint, plus an output connector the attacker controls — HTTP, SMTP, Gmail, Dropbox, Azure Blob), and actions that move data between them. The entire object lives in the Power Platform cloud. There is no file on an endpoint to scan, no inbox rule in the mailbox to enumerate with Get-InboxRule, and the flow keeps running under the connection's stored refresh token even after the user's interactive sessions are revoked. That decoupling is exactly why actors reach for it after an account takeover.

Because flow operations are logged in the Microsoft 365 unified audit log (surfaced as the OfficeActivity table with Workload == "MicrosoftFlow"), detection is an audit-log problem, not an endpoint problem. The signal you are hunting is a CreateFlow / EditFlow event, paired with a PutConnection to an output connector, performed by an account that has other compromise indicators.

FieldValue
MITRE TechniquesT1567 — Exfiltration Over Web Service
T1114.003 — Email Collection: Email Forwarding Rule (flow-based auto-forward)
T1098 — Account Manipulation (persistence via a service connection)
T1648 — Serverless Execution (cloud flow as the execution host)
Kill-chain PhaseCollection, Exfiltration, Persistence (post-compromise)
Primary Log SourceOfficeActivity (Workload=MicrosoftFlow), CloudAppEvents
Secondary Log SourcesAuditLogs (consent / DLP change / role grant), EmailEvents (auto-forward), SigninLogs (preceding takeover)
Common OperationsCreateFlow, EditFlow, PutConnection, DeleteConnection, EditPermissions (share flow to a second account)
Default SeveritySEV2 on flow+external-connector by a non-maker; SEV1 once exfiltration or mail-forwarding is confirmed
Detection WindowQuery last 24 hours for triage; extend to 7–30 days when scoping a confirmed BEC — flows are built days after the initial takeover

A flow is NOT an inbox rule. Hunting Set-InboxRule / New-InboxRule (SOP-85) will NOT surface flow-based forwarding. If a user reports missing or silently copied mail and you find no inbox rule and no transport rule, the next place to look is Power Automate.

02
Attack Paths, Log Sources & Severity Model
CONTEXT

Five concrete paths a SOC actually sees. In every one the attacker already holds the account (phishing, AiTM token theft, password spray — see SOP-04 / SOP-18 / SOP-90) and uses the flow as the outcome, not the entry point.

#Attack Path
ASilent mail exfiltration. Trigger = "When a new email arrives (V3)" on Office 365 Outlook → action = send a copy to an attacker Gmail/SMTP connector or POST the body + attachments to an HTTP endpoint. No inbox rule exists; mail still lands normally in the user's inbox so the victim notices nothing.
BSharePoint / OneDrive data theft. Trigger = "When a file is created or modified" on a sensitive library → action = copy the file to an attacker-controlled Dropbox / Azure Blob / HTTP connector. Fires continuously as staff add documents.
CScheduled bulk pull. Recurrence trigger (e.g. hourly) → list + fetch all items in a mailbox folder or document library → batch them to external storage. Survives session revocation because it runs server-side on a timer.
DShared-flow persistence. Attacker builds the flow, then uses EditPermissions to add a second (also-compromised or newly-created) account as a co-owner, so removing the first account does not remove the flow. T1098 persistence.
EDLP-policy weakening. A privileged attacker edits a Power Platform data-loss-prevention policy to move the HTTP / custom connector from "Blocked" to "Business", unblocking arbitrary outbound destinations before building the exfil flow.
Log SourceWhat it gives you
OfficeActivity (MicrosoftFlow)CreateFlow / EditFlow / PutConnection / EditPermissions with actor UPN, client IP, flow display name
CloudAppEventsDefender for Cloud Apps Power Platform activity, including connection creation to risky apps and governance alerts
AuditLogs (Entra)OAuth consent to new connector app, Power Platform environment role grant, DLP policy change
EmailEventsThe downstream auto-forward / external-copy of mail created by a mail-trigger flow
SigninLogsThe preceding account takeover (risky sign-in, impossible travel, AiTM) that explains the flow
SeveritySignal
SEV3 / LOWFlow created by a known maker/developer, internal connectors only, matches normal business automation
SEV2 / MEDIUMFlow + external/HTTP connector by a non-maker, OR by an account with any recent risk signal — investigate now
SEV1 / HIGHConfirmed mailbox/SharePoint trigger → external destination, OR confirmed data egress, OR flow built by an account with a confirmed takeover in the same window
🔍

02 — IDENTIFICATION

6 INDICATORS
▶ Investigation Workflow
T0
Alert Triage Checklist
TRIAGE

Answer these before running queries. Two or more YES = treat as SEV2 and proceed through I1–I6; any confirmed external trigger-to-destination flow = SEV1.

  • 1Was the flow created or edited by an account with any risk signal in the last 7 days (risky sign-in, AiTM, password-spray hit, impossible travel)?
  • 2Does the flow use an external output connector — HTTP, SMTP, Gmail, Dropbox, Box, Azure Blob, or a custom connector?
  • 3Is the trigger a mailbox event ("When a new email arrives"), a SharePoint/OneDrive file event, or a recurrence timer over sensitive data?
  • 4Was a new connection (PutConnection) created minutes before or after the flow, to a service the user has never used?
  • 5Did the user build this themselves and acknowledge it — or do they have no idea the flow exists?

Call the user. One question settles most of these: "Did you build an automation in Power Automate that forwards or copies your email / files?" A blank "a what?" moves this straight to SEV2 and you stop treating it as a maker's legitimate automation.

I1
Flow Creation / Edit by a Suspect Account
MANUAL + KQL
WHY CHECK

The CreateFlow / EditFlow operation is the moment the persistence object is born. An actor who has taken over an account builds the flow hours-to-days later; correlating the flow's creator and client IP against known-bad sign-in data is the fastest route from "someone made a flow" to "the attacker made a flow".

📍 Portal Navigation — Microsoft Sentinel / Purview Audit
portal.azure.com› Microsoft Sentinel› Logs
  • 1Open Microsoft Sentinel → Logs and run the KQL below against OfficeActivity (Workload MicrosoftFlow). No Sentinel? Use purview.microsoft.com → Audit → Search, Activities = "Created flow / Edited flow".
  • 2For every hit note the UserId (creator UPN), ClientIP, and the flow display name in the OfficeObjectId / parameters.
  • 3Pivot each creator UPN into SigninLogs / AADUserRiskEvents for the same window — a risky or AiTM sign-in from the same IP is the confirming link (cross-ref SOP-04 / SOP-18).
  • 4Inspect the flow in make.powerautomate.com → My flows (or admin view admin.powerplatform.microsoft.com → Environments → [env] → Resources → Flows) to read its trigger and actions.
Operation / FieldMeaningSeverity
CreateFlowA new cloud flow was created — persistence object bornINVESTIGATE
EditFlowAn existing flow was modified — trigger/action/destination may have been repointedINVESTIGATE
EditPermissionsFlow shared to another owner — shared-flow persistence (path D)HIGH
Workload = MicrosoftFlowConfirms the event is a Power Automate operation in the unified audit logCONTEXT
ClientIP = known-bad / VPN / foreignFlow built from the same IP as a risky sign-in = confirmed actor actionHIGH
DETECTS: Power Automate flow create/edit/share operations, enriched with each creator's recent risky sign-ins so attacker-built flows surface above legitimate automation.
KQL — Microsoft Sentinel / Defender XDR Advanced Hunting
// Flow create/edit/share correlated with risky sign-ins by the same actor let riskyUsers = SigninLogs | where TimeGenerated > ago(7d) | where RiskLevelDuringSignIn in ("high","medium") or ResultType == 0 and RiskState == "atRisk" | summarize RiskyIPs = make_set(IPAddress) by UserPrincipalName; OfficeActivity | where TimeGenerated > ago(24h) | where RecordType == "MicrosoftFlow" or Workload == "MicrosoftFlow" | where Operation in ("CreateFlow","EditFlow","EditPermissions") | extend Actor = tolower(coalesce(UserId, UserKey)) | join kind=leftouter (riskyUsers | extend Actor = tolower(UserPrincipalName)) on Actor | project TimeGenerated, Operation, Actor, ClientIP, OfficeObjectId, RiskyIPs | order by TimeGenerated desc
DETECTS: Same coverage in Splunk — MicrosoftFlow create/edit/share operations from the unified audit log, filtered to recent activity for manual risk correlation.
SPL — Splunk
index=o365 sourcetype="o365:management:activity" Workload=MicrosoftFlow (Operation=CreateFlow OR Operation=EditFlow OR Operation=EditPermissions) | eval Actor=lower(UserId) | table _time Operation Actor ClientIP OfficeObjectId | sort - _time
I2
New Connection to an External / Egress Connector
MANUAL + KQL
WHY CHECK

A flow can only send data somewhere it has a connection. The PutConnection operation to an output connector the user has never touched — HTTP, SMTP, Gmail, Dropbox, Azure Blob — is the exfiltration channel being wired up. A connection created within minutes of a CreateFlow is the single highest-fidelity pairing in this SOP.

📍 Portal Navigation — Connections
portal.azure.com› Microsoft Sentinel› Logs
  • 1Run the KQL below for Operation == "PutConnection" and inspect the connector name / API id in the parameters.
  • 2Flag any connector that is an egress channel: HTTP, SMTP, Gmail, Outlook.com, Dropbox, Box, Google Drive, Azure Blob Storage, FTP, or a custom connector.
  • 3In make.powerautomate.com → Connections (or admin → Environments → [env] → Resources → Connections) confirm the connection owner and the destination account/URL it authenticates to.
  • 4Correlate the PutConnection timestamp with the CreateFlow from I1 — the two within a few minutes, by the same actor, is a confirmed exfil build.
Connector / FieldMeaningSeverity
shared_webcontents / HTTPRaw HTTP action — can POST mail body + attachments to any URLCRITICAL
shared_smtp / shared_gmailOutbound SMTP / Gmail — relays mail to an external mailboxCRITICAL
shared_dropbox / shared_box / shared_googledriveThird-party storage — SharePoint/OneDrive files copied outCRITICAL
shared_azureblobAzure Blob — attacker-owned storage account exfil targetHIGH
Custom connector (shared_customapi*)Attacker-defined API — arbitrary destination, hardest to attributeHIGH
DETECTS: Creation of a Power Automate connection to an external/egress connector — the outbound channel a malicious flow needs — paired for correlation with the same actor's recent flow operations.
KQL — PutConnection to Egress Connectors
// New connections to external / egress connectors (exfil channel) OfficeActivity | where TimeGenerated > ago(24h) | where (RecordType == "MicrosoftFlow" or Workload == "MicrosoftFlow") | where Operation == "PutConnection" | extend Props = tostring(coalesce(column_ifexists("Parameters",""), OfficeObjectId)) | where Props has_any ("http","smtp","gmail","outlook.com","dropbox","box","googledrive", "azureblob","ftp","customapi") | project TimeGenerated, Operation, UserId, ClientIP, Props | order by TimeGenerated desc
DETECTS: Splunk equivalent — MicrosoftFlow PutConnection events whose connector string matches an external egress service.
SPL — Splunk
index=o365 sourcetype="o365:management:activity" Workload=MicrosoftFlow Operation=PutConnection | search (_raw="*http*" OR _raw="*smtp*" OR _raw="*gmail*" OR _raw="*dropbox*" OR _raw="*box*" OR _raw="*googledrive*" OR _raw="*azureblob*" OR _raw="*customapi*") | table _time Operation UserId ClientIP OfficeObjectId | sort - _time

The OfficeActivity schema for MicrosoftFlow varies by tenant and connector parsing — the connector may land in Parameters, OfficeObjectId, or a nested field. If the above returns nothing, broaden to all PutConnection events for the suspect actor and read the connection by hand in make.powerautomate.com rather than assuming no egress connector exists.

I3
Flow-Based Mail Auto-Forward (No Inbox Rule)
MANUAL + KQL
WHY CHECK

A mail-trigger flow produces the same outcome as a malicious forwarding rule — copies of inbound mail leaving the org — but leaves NO inbox rule and NO transport rule to find. If you see external auto-forwarded mail for a user and SOP-85 hunting comes up empty, a flow is the forwarder. This is the distinguishing check that separates SOP-118 from SOP-85.

📍 Portal Navigation — Defender Advanced Hunting
security.microsoft.com› Hunting› Advanced Hunting
  • 1Run the EmailEvents KQL below to find external-bound mail from the suspect user, then confirm in purview.microsoft.com → Audit that no New-InboxRule / Set-InboxRule / Set-Mailbox ForwardingSmtpAddress exists for them (SOP-85 scope).
  • 2If external forwarding is happening with no rule present, that is the flow signature — the forward is executing in the cloud, not in the mailbox.
  • 3Match the volume/timing of the forwarded mail against the flow's trigger (new-email) and the connection destination from I2.
  • 4Note the external recipient address — it is a primary IOC and a block target for C4.
IndicatorMeaningSeverity
External recip + no inbox ruleMail leaving the org with no rule to explain it = flow-based forwardHIGH
Sent via Gmail/SMTP connectorForwarded through a connector mailbox, not the user's own SendHIGH
Steady 1:1 inbound→outboundEvery inbound mail mirrored out = new-email trigger firingMEDIUM
DETECTS: External-bound mail from a suspect mailbox — the downstream effect of a mail-trigger exfil flow — to be cross-checked against the absence of any inbox/transport rule.
KQL — External Mail Egress for Suspect User
// External-bound mail from the suspect sender (correlate with I1/I2 flow) let suspect = ""; EmailEvents | where Timestamp > ago(7d) | where SenderFromAddress =~ suspect | where RecipientEmailAddress !endswith "@" | where EmailDirection == "Outbound" | summarize Count = count(), Recipients = make_set(RecipientEmailAddress, 20) by bin(Timestamp, 1h) | order by Timestamp desc
DETECTS: Splunk equivalent — outbound mail from the suspect user to external recipients, for manual comparison against mailbox-rule audit events.
SPL — Splunk
index=o365 sourcetype="o365:reporting:messagetrace" SenderAddress="" | search NOT RecipientAddress="*@" | stats count values(RecipientAddress) as recipients by date_hour | sort - date_hour
I4
DLP-Policy Change, Consent & Environment Role Grant
MANUAL + KQL
WHY CHECK

Well-configured tenants block the HTTP and custom connectors via a Power Platform DLP policy. A privileged attacker must first weaken that policy (path E) or grant themselves an environment-maker role before the exfil flow can reach an arbitrary destination. OAuth consent to a new connector app is the equivalent enabling step. These control-plane changes are rarer and higher-fidelity than the flow itself.

📍 Portal Navigation — Entra Audit & Power Platform Admin
entra.microsoft.com› Identity› Monitoring & health› Audit logs
  • 1Run the AuditLogs KQL below for consent grants and Power Platform role/DLP changes in the window.
  • 2In admin.powerplatform.microsoft.com → Policies → Data policies, review recent edits — a connector moved from Blocked to Business is the smoking gun for path E.
  • 3Check environment Security roles / Settings → Users + permissions for a newly-granted Environment Maker or System Administrator role on the account from I1.
  • 4Any consent to a new connector / enterprise app by the suspect account should be cross-referenced with SOP-21 (OAuth consent grant attack).
Operation / FieldMeaningSeverity
Update policy (DLP) / connector reclassifiedHTTP/custom connector unblocked — opens arbitrary egressCRITICAL
Add member to role (Env. Maker)Attacker granted rights to build flows in a shared environmentHIGH
Consent to applicationNew connector/app granted delegated or app permissionsHIGH
Add OAuth2PermissionGrantDelegated scope added to a connector app — data access pathMEDIUM
DETECTS: Control-plane changes that enable flow abuse — OAuth consent to new connector apps and Power Platform role/DLP modifications in the incident window.
KQL — Consent & Power Platform Control-Plane Changes
// Consent grants + Power Platform role / DLP policy changes AuditLogs | where TimeGenerated > ago(7d) | where OperationName has_any ("Consent to application","Add OAuth2PermissionGrant", "Add app role assignment","Add member to role","Update policy","Set DLP policy") or Category has "Policy" | extend Actor = tostring(InitiatedBy.user.userPrincipalName) | project TimeGenerated, OperationName, Actor, Target = tostring(TargetResources[0].displayName), Result | order by TimeGenerated desc
DETECTS: Splunk equivalent — Entra audit consent and Power Platform policy/role change operations around the incident window.
SPL — Splunk
index=azure sourcetype="azure:aad:audit" (operationName="Consent to application" OR operationName="Add OAuth2PermissionGrant" OR operationName="Add member to role" OR operationName="Update policy") | eval Actor=mvindex('initiatedBy.user.userPrincipalName',0) | table _time operationName Actor targetResources{}.displayName result | sort - _time
I5
Data-Movement Anomaly & Flow-Run Volume
MANUAL + KQL
WHY CHECK

A SharePoint/OneDrive-trigger or scheduled flow (paths B and C) pulls files at machine speed. CloudAppEvents / OfficeActivity will show a burst of FileAccessed / FileDownloaded / FileSyncDownloadedFull by the flow's service connection — far more files, faster, than a human. This both confirms active exfiltration (flips the incident to SEV1) and measures the data-at-risk for the timeline reconstruction.

📍 Portal Navigation — Defender for Cloud Apps
security.microsoft.com› Cloud apps› Activity log
  • 1Run the CloudAppEvents KQL for file-access bursts by the suspect account/connection; sort by count per hour.
  • 2In Defender for Cloud Apps Activity log, filter App = Microsoft SharePoint Online / OneDrive and User = suspect — look for a mass-download spike with an automation/user-agent fingerprint.
  • 3Open the flow's Run history in make.powerautomate.com to count successful runs and the data each moved — this quantifies the exfiltration for escalation.
  • 4Record the earliest successful run — that is the start of the data-at-risk window for the Section 04 timeline.
IndicatorMeaningSeverity
FileSyncDownloadedFull burstBulk library pull by the flow connection — active exfilCRITICAL
Access rate >> human baselineHundreds of files/hour = automated, not interactiveHIGH
Repeating runs on a timerRecurrence-trigger flow (path C) — persistent pullMEDIUM
DETECTS: Bursts of SharePoint/OneDrive file access or download by the suspect account that exceed a human baseline — the data-egress signature of a file-trigger or scheduled exfil flow.
KQL — SharePoint/OneDrive Access Burst
// File-access burst consistent with a file-trigger / scheduled exfil flow CloudAppEvents | where Timestamp > ago(7d) | where Application in ("Microsoft SharePoint Online","Microsoft OneDrive for Business") | where ActionType in ("FileAccessed","FileDownloaded","FileSyncDownloadedFull") | where AccountDisplayName has "" or RawEventData has "" | summarize Files = count() by bin(Timestamp, 1h), AccountDisplayName, ActionType | where Files > 100 | order by Files desc
DETECTS: Splunk equivalent — SharePoint/OneDrive file-access bursts by the suspect account exceeding an hourly threshold.
SPL — Splunk
index=o365 sourcetype="o365:management:activity" (Workload=SharePoint OR Workload=OneDrive) (Operation=FileAccessed OR Operation=FileDownloaded OR Operation=FileSyncDownloadedFull) UserId="" | bucket _time span=1h | stats count as files by _time Operation | where files > 100 | sort - files
V
IOC Extraction & FP / TP Decision Gate
VERDICT

Pull these before escalating — they drive Containment and the block list:

  • 1Flow identity — display name, flow GUID, environment, owner UPN, and any co-owners from EditPermissions.
  • 2Connection targets — connector type and the external account/URL each authenticates to (the exfil destination).
  • 3External recipients / endpoints — forwarding address, HTTP URL, storage account, Dropbox/Box account.
  • 4Actor context — creator UPN, ClientIP(s), and the correlated risky sign-in / takeover from SigninLogs.
  • 5Scope — first successful run time, run count, and data volume moved (data-at-risk).
True-Positive SignalsFalse-Positive Signals
Flow built by an account with a confirmed/risky sign-in in the same windowFlow built by a known maker/developer during working hours from a trusted device
Mailbox/SharePoint trigger wired to an HTTP / SMTP / Gmail / Dropbox / Blob connectorAll connectors internal (Office 365, Teams, Approvals, SharePoint-to-SharePoint)
User has no knowledge the flow existsUser confirms they built it and explains the business purpose
PutConnection to a never-before-used external service minutes around CreateFlowConnection to a sanctioned SaaS already in use org-wide with DLP allowing it
External auto-forward with NO corresponding inbox/transport ruleDocumented, ticketed automation (e.g. invoices to an approved partner)

"It's just a Power Automate flow" is not an exoneration. A flow that reads a mailbox or a document library and writes to an external connector is functionally an exfiltration channel regardless of who clicked Save. Decide on trigger + destination + actor risk, never on the object type.

🚫

03 — CONTAINMENT

STOP IT
C1
Verdict & Escalation Decision
DECISION GATE
▶ Based on Identification Findings — Select One
CONFIRMED Mailbox/SharePoint trigger → external connector AND (actor takeover OR confirmed egress from I3/I5) — SEV1: turn off + delete the flow, revoke connections, revoke sessions, reset the account, escalate to L2/IR
UNCERTAIN Flow + external connector but no confirmed egress and no clear takeover; user unreachable — SEV2: turn the flow OFF (do not delete yet), call the user, hold for verdict, isolate if unconfirmed in 15 min
FALSE POS. Known maker, internal connectors only, user confirms purpose with a matching ticket — document, baseline the maker, tune the rule, close

Turn the flow OFF before you delete it. Deleting first destroys the trigger/action/connection detail you need for scoping. Disable stops the bleeding; export/screenshot the definition, then delete in Eradication.

C2
Disable the Flow & Revoke Its Connections
PLATFORM
📍 Portal Navigation — Power Platform Admin
admin.powerplatform.microsoft.com› Environments› [env]› Resources› Flows
  • 1Locate the flow by GUID/name. Before any change, open it and export / screenshot the trigger, actions, and connection references for evidence.
  • 2Set the flow to Turn off (not delete). This immediately stops it firing on new triggers and on the timer.
  • 3Go to Resources → Connections, find the egress connection(s) from I2, and delete them — this invalidates the stored token the flow runs under even if it is re-enabled.
  • 4If the flow was shared (EditPermissions / path D), note every co-owner — each must be investigated and the flow removed from all of them.

Deleting the connection is what actually severs exfiltration. A flow runs under the connection's refresh token, not the user's live session — so even after you reset the password and revoke sessions in C3, an orphaned connection could keep a timer-triggered flow alive until the token expires. Kill the connection.

C3
Contain the Identity
ENTRA ID
📍 Portal Navigation — Entra ID User
entra.microsoft.com› Identity› Users› [UPN]
  • 1On the user blade click Revoke sessions to invalidate all refresh tokens, then Reset password (and require MFA re-registration if MFA methods were tampered — cross-ref SOP-80).
  • 2If takeover is confirmed, Block sign-in until the account is fully cleaned, and review Conditional Access for the user.
  • 3Review the account's OAuth app consents (Enterprise applications → User consent) and revoke any attacker-granted connector app (cross-ref SOP-21).
  • 4If the flow was shared to a second account (path D), repeat identity containment for every co-owner before closing.

Resetting the password alone does NOT stop the flow — the flow runs on the connection token, not the interactive session. Identity containment (C3) and connection deletion (C2) are both required; neither alone is sufficient.

C4
Block the Egress Destination & Purge Delivered Mail
PERIMETER + EMAIL
  • 1Block the external forwarding recipient(s) and any attacker HTTP/storage domain in security.microsoft.com → Settings → Endpoints → Indicators and at the mail gateway / proxy / firewall.
  • 2If mail was auto-forwarded externally, enumerate what left via message trace and, where the forward re-entered other inboxes, soft-delete it via Threat Explorer → Actions → Soft delete.
  • 3If a DLP policy was weakened (path E), restore the HTTP / custom connector to Blocked in admin.powerplatform.microsoft.com → Policies → Data policies immediately — this re-closes the class, not just this flow.
  • 4Add the attacker's external address / endpoint / storage account to the org block lists so a rebuilt flow cannot reuse the same destination.
🗑

04 — ERADICATION

CLEAN UP
E1
Remove the Flow, Close the Vector & Verify Clean
ERADICATION
  • 1After evidence is preserved, delete the flow and all its connections from every owner's environment. Confirm no duplicate/shared copy remains (re-run I1 for EditPermissions).
  • 2Remove any attacker-created or elevated environment role, revoke the attacker connector app's consent, and confirm the DLP policy is back to its hardened baseline (reverse path D/E).
  • 3Hunt for parallel persistence the same actor may have planted — malicious inbox/transport rules (SOP-85), mailbox delegation (SOP-111), OAuth grants (SOP-21), and additional flows under other compromised accounts.
  • 4Re-run I1, I2, I3 and I5 scoped to the account and tenant — expected result is 0 new flow/connection operations, 0 unexplained external forwards, 0 file-access bursts.
  • 5Reconstruct the timeline: initial takeover (SigninLogs) → flow created → first successful run → data moved → containment. Quantify the data-at-risk for notification decisions.
  • 6Reset credentials for every affected account, review for lateral movement from the same IP/actor, and confirm all co-owner accounts are clean.
Eradication Complete When
  • The malicious flow and all its connections are deleted from every owner / environment
  • The egress connection token is invalidated and the external destination is blocked
  • Weakened DLP policy / elevated role / attacker consent is reversed to baseline
  • Identity is reset, sessions revoked, MFA re-registered for all affected accounts
  • Re-run of I1/I2/I3/I5 returns 0 hits across the account and tenant
  • Timeline reconstructed and data-at-risk quantified for escalation / notification
📢

05 — ESCALATION

TIERS
ES1
Escalation Matrix & Notification
ESCALATION
TierTrigger ConditionWho to NotifyAction
L1 → L2Flow + external connector that L1 cannot verdict in 30 min, OR actor is a privileged account, OR >1 account involvedSOC Lead / L2 AnalystDisable flow, hand over IOCs + actor context
L2 → IRConfirmed takeover + exfiltration flow, shared-flow persistence, or DLP policy tamperingIncident Response TeamFull identity reset, tenant-wide flow hunt, timeline
IR → CISOCustomer/regulated data confirmed exfiltrated (GDPR / PCI / HIPAA), or exec/privileged mailbox forwarded externallyCISO / Legal / PrivacyBreach assessment, notification decision, BCP
ExternalConfirmed data exfiltration requiring regulator / affected-party notification, or MSSP / forensics neededMSSP, forensics vendor, regulator, law enforcementEngage per legal guidance and retention of evidence

Bring to every escalation:

  • 1Incident / alert ID and current confidence (TP confirmed / suspected / unverified).
  • 2Affected account(s) + any co-owners, the flow name/GUID/environment, and the external destination(s).
  • 3Timeline: takeover → flow created → first run → data moved → containment actions taken.
  • 4Data-at-risk estimate (mail volume forwarded, file count/size exfiltrated) and containment status.
MITRE ATT&CKTechnique
T1567Exfiltration Over Web Service (flow → HTTP / storage connector)
T1114.003Email Collection: Email Forwarding Rule (flow-based auto-forward)
T1098Account Manipulation (persistence via service connection / shared flow)
T1648Serverless Execution (cloud flow as the execution host)

A flow persists independently of the user's password and sessions. If you close the ticket after only resetting the account, the flow may still be running on its connection token. Escalate to IR for a tenant-wide flow hunt any time a confirmed takeover built even one flow — assume there may be more.


Stay Threat-Ready

Follow CyberHawk Threat Intel for daily SOC analyst playbooks, detection engineering guides, and threat intelligence.

📺 YouTube 🎤 TikTok 🐦 X / Twitter 📡 Telegram
All SOPs Blog Web App (Free)
They can't exploit you if you are the Exploit.