Design an ML Pipeline That Detects Ransomware Encryption in Backups
Last updated: November 29, 2026
Quick Overview
Design the machine learning system that scores every new snapshot for signs of ransomware (mass encryption, deletion or renames) and tells admins which snapshot is the last clean recovery point.
Rubrik
November 29, 20260
0
0 solved
Design the machine learning system that scores every new snapshot for signs of ransomware (mass encryption, deletion or renames) and tells admins which snapshot is the last clean recovery point.
Rubrik runs anomaly detection on backup metadata so customers learn about an attack from their backups and can recover from a clean point. The interviewer wants a realistic setup: few labeled attacks, huge class imbalance, per-customer baselines, explainable alerts and a cost model where missed attacks are far worse than noisy ones but alert fatigue still kills adoption.
What the Interviewer Expects
- Define the prediction target per snapshot and the clean-point output
- Engineer features from file-system diffs (entropy, extensions, churn, deletes)
- Handle scarce labels with baselines, simulation and semi-supervised methods
- Normalize per object so busy and quiet servers are comparable
- Explain alerts in terms admins understand
- Plan evaluation, thresholds and feedback loops
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you generate training data without real customer attacks?
- Attackers start encrypting slowly to stay under thresholds. How do you catch them?
- How do you avoid shipping customer file names to a central training pipeline?
- What is your offline metric and how does it map to customer pain?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Score each snapshot within minutes of backup completion. Output: anomaly probability, top contributing signals, affected paths, and the most recent snapshot before the anomaly began. Targets: recall n...
High-Level Design
After indexing, a feature job computes per-snapshot diff features on the cluster. Features stream to a scoring service that applies a global model plus per-object baseline normalization. Alerts go to ...