← Back to Index
↳ Project /07AWS · Platform · Security

Cloud Security Lab

An end-to-end attack, detect, and respond lab across AWS and Kubernetes, executing a full MITRE ATT&CK kill chain and the detection and response controls that catch it.

Role
Cloud Security
Cloud
AWS + K8s
Resources
62 (Terraform)
Framework
MITRE ATT&CK
Pacu
leaked IAM creds
PrivEsc
1k → 15k perms
S3 Exfil + STS
lateral movement
CloudTrail
+ VPC Flow Logs
OpenSearch
kill-chain SIEM
GuardDuty
IAM threat
Falco + OPA
K8s runtime
EventBridge λ
disable keys
Attack to detect to respond — Pacu kill chain, SIEM correlation, automated containment

/01Problem

Detection rules are only trustworthy if you have seen them fire against a real attack. This lab builds both sides: an offensive kill chain and the defensive controls that should catch it, so detection efficacy is demonstrated rather than assumed.

/02Attack

  • The full MITRE ATT&CK kill chain is scripted under attack/ so it runs identically every time and always under the leaked credential rather than an admin identity: initial access, permission enumeration, then privilege escalation from 1,039 to 15,319 permissions via policy attachment.
  • Then S3 exfiltration of staged PII and lateral movement via STS role assumption, with Pacu and ScoutSuite available for deeper manual exploration.

/03Detect & Respond

  • CloudTrail and VPC Flow Logs feed an OpenSearch SIEM with a kill-chain correlation dashboard.
  • GuardDuty findings on IAM threats trigger an EventBridge rule that fires a Lambda to automatically disable compromised access keys.
  • On Kubernetes, Falco runs as a DaemonSet catching runtime attacks: shell spawning, sensitive file reads, unauthorized binary execution, and container escape via host mount.
  • OPA Gatekeeper blocks privileged containers, host namespace access, and root execution across all non-system namespaces.

/04Detection as Code

  • The Gatekeeper admission policies are unit-tested with gator against known-good and known-bad pods, so a broken policy fails CI before it ever reaches a cluster.
  • CI gates selectively against a codebase that is vulnerable on purpose: the defensive modules are held to a Checkov baseline that blocks new misconfigurations, the intentionally-vulnerable surface is scanned informationally, and secret scanning blocks everywhere.
  • The exercised techniques are captured as an importable MITRE ATT&CK Navigator layer.

/05Outcome

A closed loop from exploitation to automated containment, with every control demonstrated against a live, reproducible attack rather than described in the abstract.

62 Terraform resources across 7 modules, deployable and destroyable on demand.

↳ Run Receipt/07
Provision62 Terraform resources across 7 modules, AWS plus Kubernetes
AttackPacu kill chain escalated 1,039 to 15,319 permissions and exfiltrated staged PII
DetectFalco caught 100% of simulated runtime attacks, OpenSearch correlated the kill chain
RespondGuardDuty finding fired EventBridge, Lambda disabled the compromised key
CoverageAttack · Detect · Respond
GuardDutyOpenSearchFalcoOPA GatekeepergatorEventBridgeLambdaPacuCheckovTerraform
StatusCheckingDeployed2026-08-03 18:28 UTCVisitsOriginPrivate S3 + CloudFront OACPipelineGitHub Actions OIDCCounterAPI Gateway + Lambda + DynamoDB