Attack–Countermeasure Mapping
Attack–countermeasure table
If you're worried about X, apply Y
Quick lookup: attack type → recommended countermeasure(s) → relevant GCP service or technique. Abbreviations: SDP = Sensitive Data Protection; HMAC = keyed-hash message authentication code; FPE = format-preserving encryption; ARX = open-source structural anonymization tool; DP = differential privacy; QI = quasi-identifier.
| Attack | Countermeasure | GCP / tooling | Key reference |
|---|---|---|---|
| Linkage attack (external data join on quasi-identifiers) | Increase k-anonymity (k ≥ 50 for external); add DP noise; reduce QI granularity | ARX, Privacy on Beam, PipelineDP | Module 04 (k-anonymity), Module 12 (cases) |
| Homogeneity attack (all records in group share same sensitive value) | l-diversity on sensitive attributes | ARX | Module 04 (l-diversity) |
| Background knowledge attack (attacker eliminates possibilities with external info) | t-closeness; differential privacy | ARX, Privacy on Beam | Module 04 (t-closeness, DP) |
| Dictionary / rainbow table (precompute hashes of finite-domain inputs) | Keyed HMAC (not plain hash); FPE with key rotation | SDP CryptoHashConfig (HMAC), CryptoReplaceFfxFpeConfig (FPE), Cloud KMS | Module 03 (hashing), Module 07 (key mgmt) |
| Fingerprinting / trajectory (behavioral sequence uniquely identifies) | Spatial + temporal generalization; DP noise on aggregates | Custom Beam transforms, Privacy on Beam | Module 11 (telco), Module 12 (mobility) |
| Inference attack (ML predicts sensitive attributes from QIs) | Differential privacy on query/model outputs | Privacy on Beam, PipelineDP | Module 04 (DP), Module 12 |
| Reconstruction attack (rebuild records from aggregate stats) | DP with budget tracking on all aggregate outputs | BigQuery DIFFERENTIAL_PRIVACY clause | Module 04 (DP), Module 12 |
| Composition attack (combine multiple independent releases) | DP privacy budget tracking across releases | Privacy on Beam (budget accounting) | Module 04 (composition), Module 12 |
| Membership inference (detect individual in training set) | DP-SGD training; formal DP on synthetic generators | DP-SGD (TensorFlow Privacy, Opacus) | Module 12 (testing) |
| Model inversion (reconstruct training records from model outputs) | DP training; output perturbation; limit confidence scores | DP-SGD (TensorFlow Privacy, Opacus) | Module 08 (AI patterns), Module 12 |
| Differencing attack (subtract overlapping aggregates) | DP noise with shared budget accounting; query auditing for overlapping queries | BigQuery data clean room differential-privacy analysis rules; separate query-audit layer | Module 12 |
| Vault / key compromise (theft of token vault or crypto key) | HSM-backed keys; envelope encryption; separation of duties; key rotation | Cloud KMS (HSM), Cloud EKM | Module 07 (key management) |
| Insider re-identification abuse (authorized access misused) | Audit logging; approval workflows; purpose limitation | Cloud Audit Logs, IAM Conditions | Module 09 (governance), Module 10 (ops) |
Decision shortcut: which attacks does my technique face?
| Technique | Primary attacks to test for |
|---|---|
| Plain hashing (SHA-256, MD5) | Dictionary / rainbow table |
| HMAC / keyed hashing | Key compromise, insider abuse |
| FPE / deterministic encryption | Key compromise, correlation on encrypted values |
| Vaulted tokenization | Vault compromise, insider abuse |
| k-anonymity alone | Homogeneity, background knowledge, composition |
| k-anonymity + l-diversity | Background knowledge, composition |
| Differential privacy | Budget exhaustion (if not tracked); utility loss |
| Synthetic data | Membership inference, model inversion |
| Aggregation / suppression only | Differencing, reconstruction (if multiple queries) |
| Dictionary-based pseudonymization | Vault compromise, insider abuse, fingerprinting (behavioral structure intact) |
The "is it really anonymized?" quick test
- Can it be reversed? → If yes: pseudonymization, not anonymization
- Are finite-domain inputs hashed without a key? → Dictionary attack risk
- Are individual-level records visible with precise timestamps/locations? → Fingerprinting attack risk
- Has a linkage attack been simulated? → If not: unmeasured risk
- Have multiple releases been made about the same population? → Composition attack risk
- Is synthetic data used? Has membership inference been tested? → Memorization risk
Created by Claude Opus with ❤️ for the Aliz Data Engineering team.