Security Incident and Breach Response Questions
Responding to security incidents and data breaches: containment, breach-response protocols, coordinating with security and legal, and post-breach analysis. Covers security-specific incident handling including cryptographic monitoring and lessons learned from security incidents. The security-operations overlap of incident response, distinct from general reliability incidents.
For incidents involving potential personal data exposure subject to GDPR and HIPAA, outline the notification timelines, internal approvals, and evidence required for regulator/customer notifications. Explain how SREs should prepare technical artifacts (logs, timelines, mitigation steps) that meet both regulatory evidence needs and internal postmortem standards.
Sample Answer
Framework: treat this as a legal + reliability incident. Clarify whether PHI (HIPAA) or personal data (GDPR) is involved, scope, and “time of awareness” (when a qualified person knows of a suspected breach).
Notification timelines (high level)
- GDPR: supervisory authority within 72 hours of becoming aware unless unlikely to result in risk. Data subjects “without undue delay” if high risk to rights/freedoms.
- HIPAA: covered entities must notify affected individuals without unreasonable delay and no later than 60 days from discovery; HHS OCR and (if >500 individuals) local media within 60 days; business associates must notify covered entity “without unreasonable delay.”
Always assume earlier is better — treat internal SLAs as hours, not days, until legal confirms.
Internal approvals & stakeholders
- Immediate: Incident commander (SRE), on-call security, SOC, CISO, DPO (GDPR), HIPAA privacy/security officer, legal/compliance, communications, product/ops lead, exec sponsor.
- Approval flow: SRE -> SOC/CISO -> Legal/DPO/HIPAA officer -> Exec sign-off for external notices. Use pre-approved templates to accelerate.
Evidence required for regulator/customer notifications
- Scope: number of affected records/subjects, types of data exposed (sensitive categories), period of exposure.
- Root-cause evidence: timeline of events, vulnerable component, exploit vector, code/config diffs, patch/rollback records.
- Forensic artifacts: immutable log extracts, SIEM alerts, IDS/IPS events, packet captures (if available), access control logs, database query logs, admin console access events.
- Chain of custody: export metadata, hashes (SHA256), who exported, when, storage location.
- Mitigation & remediation: immediate containment steps, long-term fixes, verification tests, mitigations to prevent recurrence.
- Impact analysis: likelihood of misuse, demonstrated evidence of exfiltration, downstream systems affected.
How SREs should prepare technical artifacts
- Start preservation immediately: snapshot affected systems, preserve disk images where needed. Switch logging to high-fidelity mode (deferred deletions turned off).
- Export logs in native and normalized formats (timestamps in UTC ISO8601). Include timezone, NTP sync status.
- Produce an incident timeline (UTC, ISO times) that maps alerts, human actions (commands with user, host, and justification), automated changes (deploys, rollbacks), and external events.
- Annotate logs with context: correlate request IDs, trace IDs, session IDs, user IDs, request payloads (redact PII when sharing internally but preserve originals for legal).
- Verify integrity: compute and store cryptographic hashes for each artifact; log chain-of-custody entries.
- Use reproducible queries: include the exact SIEM/search queries and the timestamps used to extract counts.
- Provide reproducible mitigation steps: scripts/commands used to block/rotate keys, revoke access, patch; include test evidence (load/acceptance checks) that remediation succeeded.
- Summarize for non-technical audiences: executive summary, high-level impact, customer guidance and recommended actions.
Postmortem & regulatory deliverables
- Split artifacts: one packet for regulators/legal (complete, hashed, chain-of-custody) and one internal postmortem (blameless RCA, timeline, action items, SLO impact, lessons learned).
- Postmortem should include measurable remediation owners, deadlines, verification plan, and metrics to validate recurrence risk reduction.
- Retention & access: follow legal retention requirements; limit access to need-to-know; use encrypted WORM/S3 with access logs.
Practical checklist for SREs (quick)
- Immediately preserve images/logs and compute hashes
- Notify SOC/CISO and legal/DPO
- Export SIEM logs + exact queries
- Build UTC timeline with correlated IDs
- Package mitigation scripts & test evidence
- Produce count of affected records and data types
- Hand off sealed evidence bundle to legal with chain-of-custody
This approach meets regulators’ evidentiary needs (integrity, scope, timeline, mitigations) while delivering a blameless, actionable postmortem for SRE process improvement.
Design an incident response process for an enterprise handling regulated financial data. Requirements: preserve evidence for audits, complete regulatory reporting within 24 hours of detection, restrict communications appropriately, and automate data preservation where possible. Describe roles, data preservation steps, templates, and validation/testing of the process.
Sample Answer
Requirements clarification:
- Preserve chain-of-custody and immutable evidence for audits
- Meet regulatory report filing within 24 hours of detection
- Limit external/internal communications per policy
- Automate preservation where possible
High-level process (phases):
- Detect & Triage (0–1h)
- Automated alerts enrich with context (asset owner, data classification, regulatory flags). SRE runbook triggers containment if availability impacted.
- Contain & Preserve (1–4h)
- Immediately invoke automated preservation playbook: snapshot VMs/containers, enable write-block on affected storage, export relevant logs (app, OS, network, cloud audit) to WORM storage (immutable S3/GCS bucket) and SIEM with retention tags.
- Capture volatile memory where required using forensics tool (automated via orchestrator on affected host).
- Record chain-of-custody in an audit ledger (timestamped, signed entries).
- Investigate & Remediate (4–18h)
- Forensic team (SRE + Security + Legal + Compliance + Business owner) performs analysis on preserved artifacts.
- All actions recorded; no destructive changes to preserved copies.
- Report & Communicate (within 24h)
- Compliance completes regulatory report using prefilled template (see below). Communications must follow approved whitelist: internal incident channel, legal-approved statements, and regulator contact.
- Post-Incident (after 24h)
- Postmortem, root-cause, remediation plan, lessons learned, and evidence retention verification.
Roles & responsibilities:
- Incident Commander (rotating SRE on-call): coordinate technical response, declare containment.
- Forensics Lead (Security): direct evidence capture, maintain chain-of-custody.
- Compliance Officer: prepare regulatory filings, liaise with regulator.
- Legal: approve external communications and escalation decisions.
- Service Owners/Dev Teams: supply context, implement fixes.
- Automation Engineer (SRE): author/maintain automation playbooks.
Data preservation steps (automated where possible):
- Tag incident assets and trigger IaC job to snapshot disks & containers.
- Export logs: systemd/journal, application logs, auth logs, cloud provider audit logs, network PCAP for a limited window to immutable storage.
- Lock relevant user accounts and API keys (automated rotation workflows).
- Store checksums and digital signatures of artifacts in the audit ledger.
Templates (pre-approved):
- Regulatory Report Template: incident ID, detection time, systems affected, data classification, containment actions, preservation artifacts (locations + checksums), estimated impact, next steps, contact points.
- Internal Communication Template (tiered): internal urgent, business stakeholders, approved external statement.
- Chain-of-Custody Form: artifact ID, timestamp, captured-by, capture-method, storage location, integrity hash, signer.
Automation examples (implementation snippets):
- IaC/Orchestration job triggers snapshot and uploads logs to WORM bucket; sample pseudocode (cron/CI job) automates S3 put with ObjectLock.
- SIEM integration rule auto-tags artifacts and creates incident ticket with prefilled regulatory template.
Validation & testing:
- Quarterly tabletop exercises with Compliance, Legal, Security, SRE, and Business to validate timelines and decision paths.
- Monthly automated drill: simulate low-severity incident that runs preservation playbook end-to-end (snapshots, log export, ledger entry) in staging; verify immutability and hashes.
- Annual full-scale live drill with regulator-facing reporting exercise to confirm 24-hour reporting pipeline.
- KPIs: time-to-preserve (target <2h), time-to-report (<=24h), preservation completeness (percentage of required artifact types captured).
- Audit checks: periodic verification that WORM storage enforces retention policies and ledger integrity (signed hashes match stored artifacts).
Trade-offs and controls:
- Limit PCAP collection window to balance privacy and storage costs; preserve metadata as fallback.
- Use role-based access control and approval workflows to prevent unauthorized communication or evidence tampering.
This design ensures technical automation for rapid preservation, clear roles for compliance demands, templates to accelerate reporting, and regular validation so the 24-hour regulatory requirement and auditability are reliably met.
Case study: A zero-day vulnerability with active exploitation is announced during business hours. A vendor patch is available but causes regressions in some integrations. Stakeholders demand immediate patching; partners fear breaking integrations. Propose an execution plan that balances immediate protection and availability: asset inventory, exploitability assessment, canary and staggered rollout approach, rollback criteria, customer communications, and compliance reporting.
Sample Answer
Situation: During business hours a zero-day with active exploitation is announced. A vendor patch exists but is known to cause regressions for some integrations. Stakeholders want immediate patching; partners are worried about outages.
Plan (executive summary + actions):
- Triage & owners (0–30 min)
- Convene incident command: SRE lead, security lead, product owners, vendor liaison, partner reps, communications, legal/compliance.
- Declare protection-first posture with availability constraints.
- Asset inventory & exploitability (0–60 min)
- Query CMDB/asset inventory, orchestration tags, and AD/CM tools to enumerate exposed assets by product, region, and public-facing status.
- Prioritize: internet-facing + high-privilege + exposed ports/services = Critical; internal-only or mitigated by compensating controls = Lower.
- Rapid exploitability assessment: combine vendor CVSS, known attack vectors, telemetry (IDS/IPS, WAF logs), and honeypot hits to score risk per asset.
- Immediate mitigations (parallel, 0–2 hours)
- Apply temporary compensating controls where possible: WAF rules, IPS signatures, firewall blocks, rate-limits, network segmentation, disable vulnerable feature flags.
- Increase monitoring: enable high-fidelity alerts for exploit indicators, elevate retention for relevant logs.
- Canary & staggered rollout (start within 2 hours)
- Define canary cohort: lowest-risk, non-critical customers and internal test clusters with representative integrations.
- Automated canary pipeline: patch + smoke tests (healthchecks, key integration tests, synthetic transactions) + extended runtime validation (6–24 hours depending on risk).
- Stagger strategy: expand to progressively higher-risk cohorts (10% → 30% → 60% → 100%) with manual gates and safety windows (monitor 1–4 hours per stage) and rollback verification.
- Rollback criteria and cutoffs
- Define clear, measurable rollback triggers:
- Service-level: error rate spike > X% or latency increase > Y ms sustained for Z minutes.
- Integration: failed end-to-end tests for any partner or regression in contractual SLOs.
- Security: evidence of continued exploitation despite patch.
- Pre-authorize rollbacks to previous stable image and document post-rollback mitigation (WAF rules, isolation).
- Partner & customer communications
- Immediate brief: public security advisory acknowledging issue, mitigations in place, and timeline for staged patching.
- Partner-specific channels: provide targeted guidance, test windows, rollback support, and API/contract mappings.
- Status updates: hourly during rollout, escalate to daily after stabilization. Include mitigations, ETA for full rollout, and rollback steps.
- Compliance & reporting
- Log all decisions, timestamps, who authorized actions, and artifacts (test results, telemetry) for audit trail.
- Prepare incident report for internal compliance and regulators: timeline, risk assessment, mitigation steps, customer impact, and remediation plan.
- If required by law/contract, notify affected customers/regulators within mandated timeframes.
- Post-deployment
- Full regression testing for integrations, run canary extended validation for 48–72 hours on critical services.
- Post-incident review: RCA, improve patch automation, add pre-approved compensating controls, update runbooks and SLAs.
Why this balances protection and availability:
- Immediate mitigations reduce attack surface while buying time for careful patching.
- Canary + staggered rollout minimizes blast radius and provides fast rollback if regressions occur.
- Clear rollback metrics and communication keep stakeholders informed and reduce pressure to “rush” globally.
Metrics to track:
- % assets patched, mean time to patch for critical assets, error/latency deltas, number of rollback events, customer-impact windows, and compliance timelines.
Design a concise runbook / playbook for suspected service compromise where an unauthorized admin session was detected. The runbook should include detection validation steps, containment actions safe for production, evidence collection commands or automation, stakeholder notification steps, and criteria to escalate to the security team or legal.
Sample Answer
Situation: An alert or log indicates an unauthorized admin session (e.g., console login, sudo/root shell, kubectl cluster-admin use). This runbook gives steps for validation, safe containment in production, evidence collection, notifications, and escalation.
- Detection validation (first 10–15 min)
- Confirm alert source: SIEM/IDS, cloud console, audit logs, PAM.
- Verify session details: user account, source IP, auth method, time window, MFA status.
- Quick checks:
- Linux: last -F, who, w, sudo -l -U <user>
- Cloud: aws iam get-login-profile, gcloud audit-logs query
- K8s: kubectl get events --all-namespaces; kubectl auth can-i --as=<user> --namespace=...
- Tag incident in tracker (ID + timeline).
- Containment (safe for production)
- Do NOT immediately reboot or terminate unless active malicious activity confirmed.
- Isolate session: revoke active tokens/sessions for the account first.
- Linux: pkill -u <user> (if safe), kill <pid> for suspicious shells
- K8s: kubectl delete token secrets for serviceaccount; cordon affected node only if node-compromise suspected
- Cloud: revoke API keys, rotate credentials, disable account in IAM with temporary deny
- Apply network-level controls: block source IP via WAF/security group/NSG or firewall, add temporary ACL rule.
- Evidence collection (immutable-first, document timestamps)
- Capture volatile evidence before changing state:
- ps auxwww > /tmp/ps.out; lsof -nP > /tmp/lsof.out
- netstat -tunap or ss -tunap
- last -F; who; history (copy ~/.bash_history)
- dmesg > /tmp/dmesg.out; /var/log/auth.log or /var/log/secure: tail -n 500
- K8s: kubectl get pods --all-namespaces -o wide; kubectl describe pod <suspect>
- Cloud: export CloudTrail / Audit logs for timeframe; snapshot VM disks (read-only) and export to secure storage.
- Hash and store artifacts: sha256sum files, upload to central evidence bucket with access logging.
- Automate with playbook (example): run a vetted script via bastion that collects above and pushes to S3/GCS.
- Stakeholder notification
- Immediately notify: on-call SRE, team lead, SOC (if available).
- Post initial validation (within 30–60 min): notify Incident Commander, Product/Service owner, and Legal (if PII/compliance).
- Use configured channels: pager duty, secure chat channel, and incident tracker with statuses and actions taken.
- Escalation criteria to Security/Legal
- Escalate to Security ASAP if any of:
- Evidence of data exfiltration, lateral movement, persistence, or privileged credential theft.
- Compromise spans multiple hosts/accounts or production-impacting resources.
- Adversary left backdoors (new users, scheduled tasks, unknown binaries).
- Escalate to Legal/Compliance if:
- Personal data access/exposure, regulatory scope, or breach notification thresholds.
- If escalated, freeze further remediation that could destroy evidence until SOC/legal advise.
- Post-containment actions
- Rotate credentials, rebuild compromised hosts from known-good images, re-deploy containers from trusted artifacts.
- Conduct root cause analysis, timeline, and post-incident review; update runbook and playbooks.
Keep logs of every action (who, what, when, why). Prioritize preserving evidence and minimizing production impact while removing attacker access.
Compare and contrast the primary responsibilities and handoff points between SRE and SOC teams during a security incident that impacts service availability. Provide a concrete example workflow describing who owns detection, containment, forensic evidence collection, customer communication, and regulatory notification.
Sample Answer
High-level comparison:
- SRE primary focus: restore availability and limit customer impact quickly using runbooks, mitigations, rollbacks, and infrastructure controls. SRE owns service-level triage, traffic routing, scaling, and short-term containment to meet SLOs.
- SOC/SECOPS primary focus: detect, analyze, attribute, and remediate security threats, preserve forensic integrity, and fulfill compliance/regulatory obligations. SOC owns threat investigation, evidence collection, and external reporting requirements.
- Handoff principle: SRE leads availability-first actions; SOC leads security investigation — both coordinate continuously and escalate ownership as scope shifts from operational to security.
Concrete example workflow (suspected DDoS causing service outage):
-
Detection
- SRE alert: monitoring (latency/error-rate/traffic anomalies) fires and SRE on-call investigates. Simultaneous SOC IDS/IPS and SIEM alerts flag abnormal source IP distribution.
- Ownership: initial detection — SRE; correlated security signals — SOC. They immediately notify each other.
-
Containment / Mitigation (minutes)
- SRE actions: apply traffic-shaping, enable rate-limiting, scale edge/proxy, shift traffic to healthy regions, or switch to static maintenance page per runbook to protect backend.
- SOC actions: provide blocklists, confirm malicious patterns, update WAF/edge ACLs.
- Ownership: SRE executes availability mitigations; SOC validates and recommends security filters. Changes are coordinated and logged.
-
Forensic Evidence Collection (during/after containment)
- SOC leads chain-of-custody and log preservation: collect packet captures, SIEM logs, authentication trails, WAF logs, and snapshot affected instances with forensic tools.
- SRE supports by freezing affected systems, exporting application logs, preserving metrics and deployment metadata, and ensuring no further writes overwrite evidence.
- Ownership: SOC owns integrity and legal standards; SRE provides technical access and artifacts.
-
Customer Communication
- SRE owns real-time service status updates: incident pages, status.io, ETA for service restoration, and mitigation steps to customers.
- SOC provides sanitized security details if needed (e.g., "malicious traffic identified") and advises on messaging to avoid exposing sensitive investigative details.
- Ownership: SRE leads operational communication; SOC reviews security-sensitive language.
-
Regulatory Notification & Post-Incident
- SOC determines if the incident meets breach/regulatory thresholds (data exfiltration, PII exposure) and manages legal/Compliance notifications (e.g., GDPR/PCI).
- SRE contributes timelines, impact metrics, and remediation actions for reports and the postmortem.
- Ownership: SOC leads regulatory notifications; SRE co-authors technical sections and implements long-term hardening.
Coordination practices:
- Use a joint incident bridge with clear roles: Incident Commander (SRE for availability), Security Lead (SOC), Communications owner, and Recorder.
- Share a shared timeline and artifact bucket; every action logged with timestamps.
- Post-incident: joint postmortem separating availability remediation (SRE action items) from security remediations (SOC action items) with owners and SLAs.
This separation ensures fast restoration while preserving forensic integrity and meeting compliance obligations.
Unlock Full Question Bank
Get access to all 18 Security Incident and Breach Response interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.