HackBlue

Labs / Web config review

The .env file is public

A Laravel app’s web root points at the project folder instead of public/. Find the misconfigured root, which secrets the .env file exposes, and how many times scanners fetched it.

  • Terminal mission
  • Beginner
  • 3 objectives
  • 0 of 3 solved

What you’re looking at

A Laravel app’s web root points at the project folder instead of public/. Find the misconfigured root, which secrets the .env file exposes, and how many times scanners fetched it.

Your goal: Find why the app’s .env file is downloadable and who downloaded it.

Briefing
the story: what happened and what evidence you were handed.
Terminal
the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
Walkthrough
the numbered path. Each step says what to type and what you should see. Hints open one at a time.
Answer boxes
under each question step. Type what you found and press Check.

Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.

Briefing

Frameworks such as Laravel keep secrets in a .env file in the project root and serve only the public/ subfolder. If the web server’s root points at the project root, /.env is just another static file.

Scanners request /.env on every host on the internet within hours of it appearing.

analyst@help-01

help-01 · Web config review

Type help for the command list and objectives for your tasks. Everything runs in this browser.

Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.

The whole walkthrough

Every step in order, written to be read aloud: 270 words, about 2 min. It gives away every answer, so try the steps first.