Back to list
CTFVery Easy
HackThisSite — Basic Mission 2
Ducky
2026-05-19
9 views
1 min read
HackThisSite — Basic Mission 2
Vulnerability
Missing password file — no comparison possible.
Analysis
The script loads the password from an external .txt file,
then compares it to whatever the user submits.
Sam never uploaded that file.
When the file is missing, the script has nothing to compare against — so submitting an empty string passes the check by default.
Exploit
- Leave the password field blank
- Hit Submit
That's it.
Root Cause
No null/empty check on the loaded password value. Missing file → empty/null comparison → blank input matches.
Key Takeaway
Always validate that required files and secrets actually exist before running comparison logic. A missing file should trigger an error, not a silent pass.
Tags
#hackthissite#basic mission 2#/missions/basic/2/
Keep Reading