
Responding to a Data Breach: A Capstone Walkthrough in Google Cloud Security Command Center
This lab was different. It was a capstone exercise built around a full incident response lifecycle, investigate, contain, recover, remediate, and verify, applied to a simulated but realistic data breach scenario at a fictional retail company.
Most of the labs I'd worked through up to this point focused on one specific control at a time: a firewall rule, an IAM policy, a single detection. This lab was different. It was a capstone exercise built around a full incident response lifecycle, investigate, contain, recover, remediate, and verify, applied to a simulated but realistic data breach scenario at a fictional retail company. Nothing in it was a single clever fix. It was a sequence of coordinated actions across compute, storage, and networking, each one addressing a specific vulnerability that had actually contributed to the breach.
The Scenario
The setup: a retail company, Cymbal Retail, operating physical stores and an online platform across dozens of countries, had suffered a major data breach. Attackers gained unauthorized access to sensitive customer information, including credit card data. As a junior member of the security team, my job was to work through the incident from investigation to verified remediation, using Google Cloud's Security Command Center as the primary investigative and compliance tool.
Starting with Investigation, Not Action
The first task was deliberately not about fixing anything yet. I navigated to Security Command Center's Risk Overview and reviewed the Misconfigurations pane, filtered by resource type, to see which categories of cloud resources had active findings. Three stood out with high-severity findings: Cloud Storage buckets, Compute Engine instances, and firewall configurations.
From there, I moved to the PCI DSS 3.2.1 compliance report. PCI DSS (Payment Card Industry Data Security Standard) is the specific regulatory framework that applies to any organization handling credit card data, which made it directly relevant here, this wasn't just a general security posture check, it was tied to an actual compliance obligation the company was failing to meet. Sorting the report by findings surfaced the specific non-compliant rules, each one mapped to a concrete, actionable issue:
- Firewall rule logging disabled (medium)
- Open RDP port, allowing remote desktop access from any IP on the internet (high)
- Open SSH port, same exposure for SSH (high)
- VMs assigned public IP addresses (high)
- A Cloud Storage bucket publicly, anonymously accessible (high)
- A compute instance using the default service account with full API access (medium)
The lab was explicit about which findings to disregard for this specific remediation (disabled VPC Flow Logs and overly broad primitive IAM roles were flagged as out of scope for this exercise, since they related to the lab environment itself rather than this specific incident), which is itself a useful discipline: a real investigation has to distinguish between "everything that could theoretically be improved" and "what's actually relevant to this incident," or the remediation effort never converges.
Drilling into Security Command Center's Findings page, filtered by resource type, turned up three more specific findings tied to a single compute instance,
cc-app-01 : a connection to a known malware domain (confirming the instance had actually been compromised, not just vulnerable), Secure Boot disabled, and use of the default service account.That full picture, bucket exposure, compute compromise, and permissive firewall rules, together explained how the breach actually happened: an exposed VM, with excessive permissions and no boot integrity protection, connected to malware, and from there an attacker had a path to a publicly-readable storage bucket holding sensitive customer data.
Containing and Recovering the Compromised VM
The compromised instance,
cc-app-01 , couldn't just be patched in place, once malware has actually executed on a system, you can't fully trust anything about its current state. The correct response was to shut it down and rebuild from a known-clean source.I stopped
cc-app-01 first, removing it from the network entirely. Then I created a new instance, cc-app-02 , built from a snapshot taken before the malware infection occurred, Cymbal Retail's existing backup snapshot, rather than a fresh, unconfigured image. That distinction matters: restoring from a pre-infection snapshot gets the system back to a known application state without reintroducing the compromise, versus starting from scratch and having to rebuild configuration and data from nothing.But I didn't just recreate the same vulnerable configuration. The new VM was built with the specific weaknesses from the findings deliberately corrected:
- No public IP address (External IPv4 set to None), closing the direct internet exposure that had made the original instance reachable at all
- No default compute service account (assigned a specific, scoped service account instead), removing the broad, unrestricted API access that had been a standing risk even before the breach
- A network tag (
cc), specifically so a new, tightly scoped firewall rule could be applied to this instance rather than falling under the old overly permissive rules
- Secure Boot enabled after the instance was created, specifically shutting it down again, enabling the setting, and restarting, since Secure Boot addresses the Compute secure boot disabled finding by preventing the VM from booting unauthorized or tampered code
Only after the new, hardened instance was confirmed running did I delete the original compromised VM entirely, removing the actual source of compromise rather than leaving it stopped and lingering as a latent risk.
Fixing the Exposed Storage Bucket
The storage bucket told its own part of the story directly: it contained
myfile.csv , the actual file holding the sensitive data that had been exfiltrated, and it was configured for public access, meaning anyone on the internet with the link could read it.I addressed this in two layers. First, under the bucket's Permissions tab, I used Prevent public access, directly closing the public read exposure. Then, as a challenge task without step-by-step instructions, I switched the bucket's access model to uniform bucket-level access and removed the
allUsers principal entirely.That second step matters beyond just "double-checking" the first. Cloud Storage buckets can mix two different permission models: fine-grained, object-level ACLs, and uniform, bucket-level IAM policies. Having both active at once creates exactly the kind of inconsistency that leads to a bucket looking secured in one view while still being exposed through the other. Switching to uniform access enforces one single, consistent permission model for the entire bucket and everything in it, closing that gap rather than just patching the specific symptom that had been caught.
The challenge also specifically required ensuring that legitimate users relying on basic project-level roles wouldn't lose their access in the process, a reminder that remediation isn't just about closing a hole, it has to be done without breaking the access that's actually supposed to keep working.
Rebuilding the Firewall Rules Properly
This was the part of the lab that demanded the most care, and the instructions were explicit about why: modifying overly permissive firewall rules carries real risk, because those same broad rules might also be allowing legitimate traffic that the organization actually depends on. The wrong move here isn't just leaving a vulnerability open, it's breaking production access while trying to fix it.
So the sequence mattered as much as the destination. Before removing the broad SSH access rule, I first created a new, narrowly scoped rule,
limit-ports , restricting SSH access specifically to the IP range 35.235.240.0/20 , Google Cloud's Identity-Aware Proxy (IAP) address range, and only to instances carrying the cc network tag (exactly the tag I'd applied to the new, rebuilt VM). That ordering, add the replacement before removing the original, is what prevented a gap where legitimate administrative access would have been cut off before the replacement was actually in place.Only after that replacement rule existed did I delete the three dangerously broad default rules:
default-allow-icmp , default-allow-rdp , and default-allow-ssh , each of which had been allowing unrestricted access to its respective protocol from any source on the internet.Finally, I enabled logging on the two rules that remained in effect, the new
limit-ports rule and the pre-existing default-allow-internal rule, directly addressing the firewall rule logging disabled finding and ensuring that, going forward, there would actually be a record of what traffic the firewall was allowing or denying.Verifying the Fix, Not Just Trusting It
The final task was deliberately not "declare victory and move on." I went back to the PCI DSS 3.2.1 compliance report and re-ran it, specifically to confirm the vulnerabilities identified at the start had actually been resolved, not just assumed fixed based on the actions taken.
The report confirmed the high and medium severity findings were resolved. One finding, disabled VPC Flow Logs on several subnetworks, remained visible, explicitly because it was tied to the lab environment itself rather than something within scope for this specific incident's remediation, a reminder that a verification pass needs to distinguish between "still broken and relevant" and "still showing, but out of scope," rather than treating every remaining line item as a failure.
What This Capstone Actually Demonstrates
A few things stood out, stepping back from the individual tasks.
A real breach rarely has one root cause. This incident involved an exposed VM, excessive service account permissions, disabled boot protection, an overly permissive firewall, and a publicly accessible storage bucket, all contributing simultaneously. Remediation had to address all of them together; fixing only the storage bucket, or only the firewall, would have left the actual path of compromise intact.
Containment and recovery aren't the same step. Stopping the compromised VM contained the immediate threat. Rebuilding from a clean snapshot, with the specific vulnerabilities corrected rather than just restored as-is, was recovery. Conflating the two, assuming that simply stopping a compromised system counts as fixing it, leaves the actual vulnerabilities that allowed the compromise still present in whatever comes next.
Order matters when remediation risks breaking legitimate access. Creating the restricted SSH rule before deleting the broad one wasn't incidental, it was the specific technique that avoided a self-inflicted outage while still closing the actual vulnerability. Security fixes that ignore operational continuity aren't automatically the right fixes.
Compliance frameworks like PCI DSS translate abstract security principles into specific, auditable, actionable findings. Rather than reasoning from first principles about what "good security" looks like, the PCI DSS report gave a concrete, prioritized list tied directly to real regulatory obligations, exactly the kind of structure that makes remediation tractable in a real incident rather than an open-ended exercise.
Verification is the step that closes the loop. Every fix in this lab could have been individually correct and the overall response could still have failed if nobody went back and confirmed the compliance report actually reflected the new, remediated state. Re-running the report wasn't a formality, it was the only way to know the remediation had actually worked rather than just appeared to.
Final Thoughts
This capstone pulled together threads from several individual labs, IAM scoping, firewall design, storage bucket permissions, VM hardening, into a single coherent incident response exercise, and the coordination between them was really the point. A security incident response isn't a checklist of isolated fixes; it's a sequence where investigation informs containment, containment enables safe recovery, recovery has to be built correctly rather than just restored, and the whole thing has to be verified against a real compliance standard before it's actually considered resolved.
That's the shape of real incident response work: not one clever technical fix, but a disciplined, ordered process that closes every contributing gap, confirms the result, and does it without breaking what was supposed to keep working the whole time.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article