Join our Newsletter — 33% off our NHI Course
Home› Guides› If your data warehouse and lakehouse is compromised:…
Guide Data Security

If your data warehouse and lakehouse is compromised: containment, rotation and rebuild steps

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 14 November 2026 13 min read
On this page

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.

StageHow it happens in a warehouseATT&CK technique
Initial accessSign-in with a stolen password, key or token, often from infostealer logs or a leaked notebook or CI fileT1078.004 Cloud Accounts, T1552.001 Credentials In Files
Token theftOAuth refresh tokens held by BI or SaaS tools, or personal tokens in developer configsT1528 Steal Application Access Token, T1550.001 Application Access Token
PersistenceNew users, roles, grants, keys or tokens added to existing service usersT1136.003 Cloud Account, T1098 Account Manipulation
CollectionBulk queries across schemas, or direct reads of lakehouse files in object storageT1213 Data from Information Repositories, T1530 Data from Cloud Storage
ExfiltrationUnload to an external stage or bucket, or a share to another tenantT1537 Transfer Data to Cloud Account, T1567.002 Exfiltration to Cloud Storage
ImpactDropping tables, shortening retention, overwriting data, extortionT1485 Data Destruction, T1490 Inhibit System Recovery, T1565.001 Stored Data Manipulation, T1657 Financial Theft

How the incident shows up

SignalWhere to confirm itWhat it may mean
Successful logins from unfamiliar addresses, clients or driver versionsPlatform login history, IdP sign-in logsCredential use from attacker infrastructure
Human logins with no second factorLogin history authentication factor fieldsPassword-only sign-in, the common entry path
Service user signing in from outside its tool's egress rangeLogin history, network policy logsStolen key or token
Large result sets, high bytes scanned or data unloadedQuery history, cost and compute usageBulk collection or export
New external stages, storage integrations, outbound shares or external functionsObject metadata, query history for create statementsAn exfiltration channel
New admins, role grants or credentials on service usersGrant history, admin audit eventsPersistence
Direct reads of table files by principals other than the platformCloud storage access logsBypass of catalogue controls
Retention set to zero, tables dropped, audit export changedAdmin audit eventsDestruction or covering tracks
Extortion message naming your tablesEmail, leak site monitoringData already taken

Triage questions

  1. 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.
  2. 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.
  3. What did those sessions do? Join logins to sessions to queries. List statements, role, compute resource, start time, bytes and rows returned or unloaded.
  4. 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.
  5. Did the attacker change the platform? Search for user, role, grant, network policy, stage, integration, share, task and retention changes in the window.
  6. Was storage read directly? For lakehouses, check object storage logs for reads of table paths by anything other than the platform's own roles.
  7. Is it still live? If sessions are recent, move to containment now and finish scoping afterwards.
  8. 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

  1. 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.
  2. Preserve volatile evidence: copy login, session, query, access and grant history for the window into a locked location before you change users or objects.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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 typeTypical reachRotation action
Human passwordsWhatever roles the user holdsSet a new password, not only a reset link; enforce SSO and MFA; block password login where possible
Service user key pairsPipelines and connectorsRemove every registered public key, issue a new pair, store the private key in a vault, update the tool
Personal and programmatic access tokensNotebooks, CLI, scriptsRevoke all tokens for affected users; set a maximum lifetime by policy
OAuth consents and refresh tokensBI dashboards, SaaS tools acting for usersRevoke consents for the integration and user; see the OAuth Token Theft Incident Playbook
Storage integration and cloud rolesBuckets, containers and external locationsRebuild role trust tied to the warehouse account, narrow to named prefixes
Secrets held by the warehouse for outbound callsExternal APIs and functionsRotate at the target, then update the stored secret
Customer managed encryption keysAll data at restReview 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

  1. Find the first attacker action from query and admin history, so you know which restore points predate it.
  2. 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.
  3. Restore dropped or altered objects from time travel, snapshots or backups to a separate schema first, then compare before swapping.
  4. Re-run critical pipelines from source systems for tables where tampering cannot be ruled out.
  5. Bring identities back in stages: humans after their IdP account and device are cleared; services with new credentials and network policies.
  6. 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

EvidenceWhy it matters
Login and session history, incident window plus 90 days beforeWho signed in, from where, with which method
Query history for suspect sessions and rolesExact statements, bytes, rows and unload targets
Object and column access historyWhich data was read, for notification scoping
Grant and admin audit historyPersistence and configuration changes
Definitions of suspect users, stages, integrations, shares and tasksState before removal
Object storage access logs for lakehouse paths and external stagesDirect reads and exfiltration destinations
IdP sign-in logs and device data for affected usersWhere the credential came from
Provider support case historyRecovery 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

MetricTarget after recovery
Human users signing in without MFAZero
Service users with password authenticationZero
Logins from outside network policy allow listsZero, alerted within the history view latency
External stages, integrations and shares without a named ownerZero
Principals with direct read on lakehouse table storage other than the platformZero, reviewed monthly
Time from suspect login to identity disabled in exercisesUnder 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

PhaseNIST CSF 2.0NIST SP 800-53 Rev 5
Detection and triageDE.CM-03, RS.AN-03AU-6, IR-4
ContainmentRS.MI-01AC-2, SC-7
Rotation and eradicationRS.MI-02, PR.AA-01IA-5, AC-6
Data recoveryRC.RP-03, PR.DS-01CP-9, CP-10, SI-7
Evidence and notificationRS.CO-02AU-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

Related NHI Mgmt Group resources: Securing the data warehouse and lakehouse itself, Snowflake Account Compromise Playbook, Data Exfiltration Playbook, Data Lake Security Guide.

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.