Sitemap
InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

TryHackMe: Lockdown Walkthrough

2 min readJul 6, 2026

--

Arman Kumar

Press enter or click to view image in full size

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 LOGS

The 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.

--

--

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/