The goal of this lab is to locate leaked backup files and extract a hard-coded database password from the disclosed source code.
robots.txt is designed to tell search engine crawlers which paths not to index :
/robots.txtrevealed a disallowed /backup directory.
Press enter or click to view image in full size
Browsing directly to /backup surfaced a file named:
ProductTemplate.java.bakGet Zeyad Naguib’s stories in your inbox
Join Medium for free to get updates from this writer.
Press enter or click to view image in full size
Navigating to:
/backup/ProductTemplate.java.bakReading through the disclosed source, the database connection logic contained a hard-coded password used to authenticate against a Postgres database.
Press enter or click to view image in full size
I copied the password value, returned to the lab, clicked Submit solution, and entered it. The lab was marked as solved.
Press enter or click to view image in full size