When an attacker controls a data warehouse or lakehouse, the data can leave through ordinary queries, unload jobs and shares that look like normal analytics, so the response has to run on the platform's own audit trail and identity controls rather than on endpoint tools. This playbook covers a compromise of the platform itself: its administrators, its service users and tokens, its integrations with ingestion, BI and notebook tools, the object storage under lakehouse tables and the data. It sets out how the incident shows up, triage questions, containment in priority order, credential rotation by type, eradication, rebuilding trust in the data, the evidence to keep and when notification rules apply. It is vendor-neutral and written for data platform owners, security operations and incident responders. Product terms differ, so map each step to your platform's own objects. For a worked, product-specific version see the Snowflake Account Compromise Playbook; hardening before an incident is in Securing the data warehouse and lakehouse itself.
Key takeaways
- Query the platform first. Login, session, query and access history held by the warehouse are the primary evidence, and some views lag by hours, so a quiet first result does not mean nothing happened.
- Every authenticator is separate. Passwords, key pairs, personal or programmatic tokens, OAuth consents and storage integration roles each need their own revocation; resetting one leaves the others working.
- The storage layer is a second door. In a lakehouse the table files sit in object storage, and anyone with direct read on the bucket bypasses catalogue grants, masking and row policies.
- Exfiltration paths persist. Scheduled tasks, external stages, outbound shares and unload jobs can keep moving data after the attacker's user is disabled.
- Scope by object and column. Notification decisions depend on which tables and personal data columns were read, so preserve access history before clean-up changes the picture.
Why a warehouse compromise is different
A warehouse concentrates the organisation's most valuable data behind one control plane, and most of its logins are not human: ingestion tools, transformation jobs, orchestrators, BI dashboards, notebooks and reverse ETL connect with service identities that outnumber people. The ATT&CK techniques that describe the attacker's path are consistent across products.
| Stage | How it happens in a warehouse | ATT&CK technique |
|---|---|---|
| Initial access | Sign-in with a stolen password, key or token, often from infostealer logs or a leaked notebook or CI file | T1078.004 Cloud Accounts, T1552.001 Credentials In Files |
| Token theft | OAuth refresh tokens held by BI or SaaS tools, or personal tokens in developer configs | T1528 Steal Application Access Token, T1550.001 Application Access Token |
| Persistence | New users, roles, grants, keys or tokens added to existing service users | T1136.003 Cloud Account, T1098 Account Manipulation |
| Collection | Bulk queries across schemas, or direct reads of lakehouse files in object storage | T1213 Data from Information Repositories, T1530 Data from Cloud Storage |
| Exfiltration | Unload to an external stage or bucket, or a share to another tenant | T1537 Transfer Data to Cloud Account, T1567.002 Exfiltration to Cloud Storage |
| Impact | Dropping tables, shortening retention, overwriting data, extortion | T1485 Data Destruction, T1490 Inhibit System Recovery, T1565.001 Stored Data Manipulation, T1657 Financial Theft |
How the incident shows up
| Signal | Where to confirm it | What it may mean |
|---|---|---|
| Successful logins from unfamiliar addresses, clients or driver versions | Platform login history, IdP sign-in logs | Credential use from attacker infrastructure |
| Human logins with no second factor | Login history authentication factor fields | Password-only sign-in, the common entry path |
| Service user signing in from outside its tool's egress range | Login history, network policy logs | Stolen key or token |
| Large result sets, high bytes scanned or data unloaded | Query history, cost and compute usage | Bulk collection or export |
| New external stages, storage integrations, outbound shares or external functions | Object metadata, query history for create statements | An exfiltration channel |
| New admins, role grants or credentials on service users | Grant history, admin audit events | Persistence |
| Direct reads of table files by principals other than the platform | Cloud storage access logs | Bypass of catalogue controls |
| Retention set to zero, tables dropped, audit export changed | Admin audit events | Destruction or covering tracks |
| Extortion message naming your tables | Email, leak site monitoring | Data already taken |
Triage questions
- Who signed in from where? Pull successful logins for 30 to 90 days grouped by user, source address, client and authentication method. Flag addresses that are not corporate egress, VPN, private endpoints or known tool ranges.
- Which credential was used? A password, key pair, personal token, OAuth integration or federated identity each points to a different revocation. Note whether it was a human or service identity.
- What did those sessions do? Join logins to sessions to queries. List statements, role, compute resource, start time, bytes and rows returned or unloaded.
- Which objects and columns were touched? Use object-level or column-level access history where the platform provides it. This scopes personal data for notification.
- Did the attacker change the platform? Search for user, role, grant, network policy, stage, integration, share, task and retention changes in the window.
- Was storage read directly? For lakehouses, check object storage logs for reads of table paths by anything other than the platform's own roles.
- Is it still live? If sessions are recent, move to containment now and finish scoping afterwards.
- Where did the credential come from? The user's IdP account, device, repositories, notebook stores and CI logs are all upstream sources to check.
Containment priorities
- Secure responder access: confirm at least two responders can sign in with phishing-resistant MFA from known addresses, and keep the break-glass admin under split control. An emergency network policy that omits responder addresses can lock you out.
- Preserve volatile evidence: copy login, session, query, access and grant history for the window into a locked location before you change users or objects.
- Disable suspect identities: disable the users rather than deleting them, which keeps their history and properties for investigation. On most platforms disabling also stops new sessions; check whether running and scheduled work is aborted.
- Apply an emergency network policy: limit the account to responder, corporate and known integration addresses, and bind service users to their tool's egress range.
- Cut exfiltration paths: suspend unknown external stages, storage integrations, outbound shares, external functions and scheduled tasks created or altered in the window. Record their definitions before removing them.
- Lock retention: set an account-level minimum for time travel or snapshot retention where the platform supports one, so an attacker cannot reduce it on individual objects, and protect backups from deletion.
- Close the storage door: restrict direct read on lakehouse buckets and containers to the platform's own roles, and review bucket policies for new principals.
- Contain upstream: reset the affected IdP accounts, revoke their sessions and check devices. If the IdP itself is in doubt, follow the Identity Provider Tenant Compromise Playbook.
Credential rotation
| Credential type | Typical reach | Rotation action |
|---|---|---|
| Human passwords | Whatever roles the user holds | Set a new password, not only a reset link; enforce SSO and MFA; block password login where possible |
| Service user key pairs | Pipelines and connectors | Remove every registered public key, issue a new pair, store the private key in a vault, update the tool |
| Personal and programmatic access tokens | Notebooks, CLI, scripts | Revoke all tokens for affected users; set a maximum lifetime by policy |
| OAuth consents and refresh tokens | BI dashboards, SaaS tools acting for users | Revoke consents for the integration and user; see the OAuth Token Theft Incident Playbook |
| Storage integration and cloud roles | Buckets, containers and external locations | Rebuild role trust tied to the warehouse account, narrow to named prefixes |
| Secrets held by the warehouse for outbound calls | External APIs and functions | Rotate at the target, then update the stored secret |
| Customer managed encryption keys | All data at rest | Review key policy and administrators; see the Encryption Key Compromise Playbook if key access changed |
Rotate at the source of trust first, then update the consuming tool, then confirm the old credential fails. The OWASP Secrets Management Cheat Sheet makes the point that restarting an application does not revoke stolen credentials, and RFC 9700 recommends sender-constrained tokens so that a stolen token is less useful. For leaked tokens found in code or notebooks, see Database platform tokens; for zero-downtime swaps, see How to rotate database credentials without downtime.
Eradication
- Users and roles: record properties, then drop attacker-created users. Compare current grants with a pre-incident baseline and revoke added grants, especially of admin and ownership roles.
- Stages, integrations and shares: list all of them and confirm each has a known owner and destination. Remove consumer tenants you do not recognise from outbound shares.
- Scheduled code: review tasks, procedures, streams, functions and orchestrator jobs created or altered in the window. A scheduled unload can keep running after its creator is disabled if its owning role is untouched.
- Unload guardrails: where the platform offers them, require pre-approved storage integrations for external stages and block unload to locations typed inline into a statement.
- Close the entry path: require MFA for every human, block password authentication for service users and keep per-user network policies.
Rebuilding trust in the data
- Find the first attacker action from query and admin history, so you know which restore points predate it.
- Verify restore points: NIST CSF 2.0 RC.RP-03 expects backup integrity to be checked before use. Compare row counts and checksums of critical tables with independent sources.
- Restore dropped or altered objects from time travel, snapshots or backups to a separate schema first, then compare before swapping.
- Re-run critical pipelines from source systems for tables where tampering cannot be ruled out.
- Bring identities back in stages: humans after their IdP account and device are cleared; services with new credentials and network policies.
- Relax the emergency network policy in one recorded change and confirm every integration still connects.
Rebuild or clean in place
- Clean in place when the platform is a managed service, the provider confirms no platform-side compromise, and audit history covers the whole window.
- Rebuild the account or workspace when the attacker held the top administrator role for long enough to change logging, retention or keys, or when history has gaps.
- Self-managed clusters where the attacker reached the hosts need rebuilding from trusted images.
- Small teams with a handful of pipelines may find a fresh account with infrastructure as code quicker than auditing every grant; large estates should work by data domain, starting with personal and regulated data.
Evidence to preserve
| Evidence | Why it matters |
|---|---|
| Login and session history, incident window plus 90 days before | Who signed in, from where, with which method |
| Query history for suspect sessions and roles | Exact statements, bytes, rows and unload targets |
| Object and column access history | Which data was read, for notification scoping |
| Grant and admin audit history | Persistence and configuration changes |
| Definitions of suspect users, stages, integrations, shares and tasks | State before removal |
| Object storage access logs for lakehouse paths and external stages | Direct reads and exfiltration destinations |
| IdP sign-in logs and device data for affected users | Where the credential came from |
| Provider support case history | Recovery requests and decisions |
Platform history views often hold more than the SIEM, but short-retention views and functions may roll over within days. Copy evidence to a restricted location, hash exports and keep chain of custody; see the Evidence Handling and Chain of Custody Guide. NIST SP 800-61 Rev. 3, published in April 2025 as a CSF 2.0 Community Profile, frames these steps within the Respond and Recover functions.
Notification triggers
- Personal data: GDPR Article 33 requires the controller to notify the supervisory authority without undue delay and, where feasible, not later than 72 hours after becoming aware of a personal data breach, unless it is unlikely to result in a risk to individuals. A processor must notify the controller without undue delay.
- Shared data: if outbound shares or unloads exposed data you hold for customers or partners, contractual notification clauses usually apply.
- Other regimes: see the Breach Notification Laws by Country Guide.
Detection and measurement
| Metric | Target after recovery |
|---|---|
| Human users signing in without MFA | Zero |
| Service users with password authentication | Zero |
| Logins from outside network policy allow lists | Zero, alerted within the history view latency |
| External stages, integrations and shares without a named owner | Zero |
| Principals with direct read on lakehouse table storage other than the platform | Zero, reviewed monthly |
| Time from suspect login to identity disabled in exercises | Under one hour |
Ongoing posture metrics are in the Data warehouse and lakehouse health check.
Common failure patterns
- Resetting a password and stopping: key pairs, tokens and OAuth consents on the same user keep working.
- Disabling the user but not its jobs: tasks owned by a role the attacker created keep unloading data.
- Ignoring the storage layer: catalogue grants are cleaned up while a bucket policy still lets an attacker principal read every table file.
- Losing the evidence: short-retention history views roll over before anyone copies them, leaving notification scoping to guesswork.
- Locking out responders: an emergency network policy applied from the wrong address removes the team's own access.
Framework mapping
| Phase | NIST CSF 2.0 | NIST SP 800-53 Rev 5 |
|---|---|---|
| Detection and triage | DE.CM-03, RS.AN-03 | AU-6, IR-4 |
| Containment | RS.MI-01 | AC-2, SC-7 |
| Rotation and eradication | RS.MI-02, PR.AA-01 | IA-5, AC-6 |
| Data recovery | RC.RP-03, PR.DS-01 | CP-9, CP-10, SI-7 |
| Evidence and notification | RS.CO-02 | AU-9, IR-6 |
The NCSC Cloud Security Principles apply to the service as a whole: principle 10 limits access to service interfaces to securely authenticated and authorised identities, human or machine, and principle 13 covers audit information and alerting for customers.
Where identity fits
Most warehouse compromises run through identities: a human login without MFA, a service user's key in a repository, or a BI tool's refresh token. Give every service identity an owner, a network policy and a credential that is not a password. See the Database Credential and Access Security Guide and the Non-Human Identity (NHI) Guide. Platform-specific guides are available for Amazon Redshift, Azure Synapse Analytics, BigQuery, Databricks, Snowflake and Teradata (listed alphabetically).
Practitioner checklist
- A responder group with MFA and known addresses can administer the platform during an incident.
- Every service identity is listed with owner, credential type, network range and consuming tool.
- Login, query, access and admin history export to a SIEM run by another team, with retention beyond the platform's.
- An account-level minimum retention and protected backups are in place.
- External stages, integrations and shares are allow-listed and each has an owner.
- Direct read on lakehouse storage is limited to the platform's roles.
- A per-credential-type revocation runbook exists and has been exercised.
- Notification scoping can use column-level access history.
Standards and references
- NIST: SP 800-61 Rev. 3 Incident Response Recommendations and Considerations for Cybersecurity Risk Management
- NIST: Cybersecurity Framework 2.0
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
- MITRE ATT&CK: Transfer Data to Cloud Account
- MITRE ATT&CK: Data from Cloud Storage
- NCSC: The Cloud Security Principles
- OWASP: Secrets Management Cheat Sheet
- GDPR: Article 33 Notification of a personal data breach to the supervisory authority
Related NHI Mgmt Group resources: Securing the data warehouse and lakehouse itself, Snowflake Account Compromise Playbook, Data Exfiltration Playbook, Data Lake Security Guide.