TryHackMe: Lockdown Walkthrough
Arman Kumar
When Logs Leak More Than Data
Not every AI vulnerability comes from prompt injection.
Sometimes, the weakness lies deeper — inside the retrieval pipeline.
In this room, a bastion retrieval system exposed sensitive internal documents due to multiple security misconfigurations.
The mission was to secure the system and recover the hidden flag.
Step 1 — Inspect the Logs
I started with the obvious command:
SHOW LOGSThe response immediately exposed a major issue:
Travel Policy, Client Contracts ($4.2M, Rachel Dunn), Employee Data (PIP)That was the first vulnerability.
The system was returning raw sensitive document data with no filtering.
Vulnerability 1 — No Metadata Filtering
The first fix was implementing guardrails at retrieval time.
I applied metadata pre-filtering so confidential documents would be excluded.
That revealed the first flag fragment:
THM{l0ck_Vulnerability 2 — Verbose Logs
Even after filtering, logs still leaked sensitive retrieval information.
Get Arman Kumar’s stories in your inbox
Join Medium for free to get updates from this writer.
The solution was log redaction.
Instead of logging raw retrieved content, the system should log only document identifiers.
After applying redaction:
d0wn_Second fragment recovered.
Vulnerability 3 — Missing Tenant Isolation
The final issue was authorization.
The vector database returned results without properly checking tenant boundaries.
That meant one tenant could potentially access another tenant’s data.
Enforcing tenant isolation fixed the final vulnerability.
Fragment recovered:
s3cur3d}Final Flag
Combining all fragments gave:
THM{l0ck_d0wn_s3cur3d}Final Thoughts
This room highlights three critical RAG security principles:
- Filter before retrieval
- Never log sensitive data
- Enforce strict authorization boundaries
Many AI systems focus heavily on prompt safety while ignoring retrieval architecture.
But if the retrieval layer is weak, attackers don’t need jailbreaks.
They just need access.








