$ cat writeup.md…
$ cat writeup.md…
bluehens
Task: a Magic Link Login Service with hidden paths revealed in robots.txt. Solution: enumerate disallowed paths from robots.txt, access exposed /.env file to retrieve leaked credentials and flag.
Magic Link Login Service at https://bluehens-magic-link.chals.io
A simple web application offering magic link authentication. The goal is to find the flag hidden somewhere in the application.
The main page (/) presented a simple Magic Link Login Service interface. Standard recon revealed a robots.txt file with interesting disallowed paths:
User-agent: *
Disallow: /inbox
Disallow: /dashboard
Disallow: /.env
The presence of /.env in the disallowed list is a major red flag — it suggests the environment file might be publicly accessible despite the robots.txt directive (which only instructs crawlers, not enforces access control).
The /.env file was directly accessible without authentication. This is a classic misconfiguration where sensitive configuration files are deployed to production and served by the web server.
Check robots.txt for hidden paths:
curl https://bluehens-magic-link.chals.io/robots.txt
Access the exposed .env file:
curl https://bluehens-magic-link.chals.io/.env
Retrieved contents:
[email protected]
TEDDYS_TOKEN=udctf{REDACTED}
[email protected]
INBOX_URL=http://localhost:5050/inbox?token=${TEDDYS_TOKEN}
The flag was directly exposed as TEDDYS_TOKEN in the environment file.
The /inbox and /dashboard paths mentioned in robots.txt were potential rabbit holes. Once the .env leak was discovered, there was no need to explore authentication bypass or inbox exploitation — the flag was already in hand.
/.env, /.git/config, /config.php, /wp-config.php.bakREDACTED = "don't host your env file"$ cat /etc/motd
Liked this one?
Pro unlocks every writeup, every flag, and API access. $9/mo.
$ cat pricing.md$ grep --similar