Scenario 2 of 2 · Proactive audit
OpenDoor — find it before the breach
Same account, same incident — but this time you're auditing the configuration before anything happened, to find the misconfigurations that made TollBooth possible.
Open a terminal. cd ~/tollbooth/opendoor. claude. Paste only the
prompt text below.
~20 min. CORE phases (1, 3, 5) tell the full story. DEEP phases (2, 4) are for a quiet queue or to run later. No agent? Terminal fallback commands are at the bottom.
Full configuration audit
Paste this, then Enter:
You will see: three findings — a public S3 bucket, an over-permissioned IAM role, and IMDSv1 still allowed — each tagged with a CIS control and a CSF category.
Three findings: bucket policy Principal '*' + Public Access Block
all-false (public S3, CIS 2.1.4 / CSF PR.PS); IAM with PutRolePolicy/
AttachRolePolicy/PassRole on * (self-privesc, CIS
1.15 — not 1.16, that's stale v1.5 numbering / CSF PR.AA);
MetadataOptions.HttpTokens='optional' (IMDSv1, CIS 5.7 — not
5.6, that's stale v3.0 numbering / CSF PR.PS). CIS numbers drift between benchmark
versions — always confirm against the current release (v5.0.0), never quote from memory.
Reveal the answer
Public bucket: 'PublicRead' (Principal *) +
Block Public Access all-false. CIS v5.0.0 2.1.4 (S3 Block Public Access) / CSF PR.PS.
IAM privesc: 'TooBroad' =
PutRolePolicy/AttachRolePolicy/PassRole on * (role can self-admin). CIS
v5.0.0 1.15 (full-admin IAM policy attached — 1.16 in the current benchmark is an
unrelated AWS-Support-role control, an easy stale-number mistake) / CSF PR.AA.
IMDSv1: HttpTokens='optional'. CIS v5.0.0 5.7 (EC2
Metadata Service IMDSv2-only — 5.6 in the current benchmark is VPC peering routing, also
unrelated) / CSF PR.PS.
Rank by blast radius
Same chat:
You will see: reasoning about which matters most — credential theft vs. self-admin IAM vs. public data exposure.
A defended ordering. Reasonable top pick: IMDSv1, because it's the actual entry point for credential theft. The point is the reasoning, not one "right" order.
Reveal the answer
Defensible top pick = IMDSv1: it's the live entry point (creds actually stolen through it). IAM privesc = highest potential (full admin) but unused. Public bucket = real exposure, but not the path here.
Correlate with the breach
Same chat:
You will see: IMDSv1 exploited, the IAM role only probed, the public bucket bypassed — and they are not all the same.
Each finding labelled exploited / probed / bypassed with log evidence — and they are deliberately not all the same.
Reveal the answer
IMDSv1 = exploited (creds stolen, used from 203.0.113.66). IAM = probed only (enumeration, no PutRolePolicy in logs). Public bucket = bypassed (see Phase 4).
Check the agent's call
Same chat:
You will see: the theft was authenticated with the stolen key — the public policy was not the route. A latent exposure, not the breach path. Correct the agent if it said "exploited."
The exfil GetObjects are authenticated (stolen key), not anonymous — so
the public policy was not the path. If the agent said the bucket was "exploited," this is
where you correct it.
Reveal the answer
Exfil GetObjects are authenticated with the stolen key,
not anonymous — the public policy was never used. The bucket is a latent exposure, not
the breach route. Agents often mis-call this "exploited" — this is the deliberate catch
in this phase.
Prioritized remediation
Same chat:
You will see: IMDSv2 first (breaks the real chain); tighten IAM; close the public bucket anyway — each tied to a D3FEND ID.
Ordered by real risk: IMDSv2 first (breaks the chain), then IAM least-privilege, then close the public bucket (latent).
Reveal the answer
1) HttpTokens=required (IMDSv2) — breaks the chain.
D3FEND: D3-ITF (inbound traffic filtering on the /proxy SSRF).
2) Remove iam:* on *. D3FEND: no direct
technique — this is an authorization-scoping fix, not a traffic control.
3) Block Public Access + drop Principal *. D3FEND:
D3-OTF (outbound/access filtering on the bucket).
Explore without spoiling it
jq '.Statement[].Principal' s3-bucket-policy.json # any wildcard?
jq '.Reservations[].Instances[].MetadataOptions.HttpTokens' ec2-metadata-options.json
Terminal fallbacks (no agent)
jq -r '.Statement[]|select(.Principal=="*")|.Sid' s3-bucket-policy.json # public grant
jq -r '.Reservations[].Instances[].MetadataOptions.HttpTokens' ec2-metadata-options.json
cat ../cloudtrail/*.json | jq -r '.Records[]|select(.sourceIPAddress=="203.0.113.66")|.eventName'
Authorized & lawful use only. All data is synthetic and self-contained; no live systems are touched. Promotes the open-source Anthropic Cybersecurity Skills library (Apache-2.0); not affiliated with Anthropic PBC.