Hack this server.
It says it can't be done.
This site is served by LeanNginx, a small web server that reads nginx's configuration language and is written in Lean. Its request parsing, routing and access checks come with machine-checked proofs: no path leaves the web root, no file under a password-protected location is served without the password, no request is split or smuggled. Proofs are only as good as what they state, and the server around them is ordinary code. Find where they stop.
The flags
| # | Where | What stands in the way |
|---|---|---|
| 1 | /vault/flag.txt | auth_basic with a long random password |
| 2 | flag.txt one directory above the web root | path normalisation (.., %2e%2e, %252e, ..;, …) |
| 3 | a page under /staff/ | a second auth_basic, next to a try_files /q/$args.html catalog: the pattern that let GET /?../staff/… read protected pages through stock nginx |
Each flag is a line starting with FLAG{. A flag, or any other way to make the server
misbehave (a crash, a hang, a response that breaks HTTP, a header you control), counts.
What is here
- /?rules and /?about: the catalog (
location = / { try_files /q/$args.html /index.html; }) - /files/: a directory listing (
autoindex on) - /docs/: an
alias - /vault/, /staff/: password protected
- HTTP/1.1 and HTTPS (TLS 1.3 by LeanTLS, also in Lean)
- The full configuration: /files/nginx.conf.txt
Rules
- In scope: this host,
hackme.click, on ports 80 and 443. Automated scanners are fine. - Out of scope: floods and volumetric denial of service (a single request or a handful of connections that take the server down is in scope and very interesting), the AWS account and network around it, other domains, social engineering.
- Don't change or delete what you find; read it and tell us.
Report
Email support@beneficialaifoundation.org with the flag or the behaviour, and the exact request that produced it. Real findings are fixed in the open in the LeanNginx repository and credited there if you like.
What is proved, and what isn't
Proved (in Spec.lean,
108 theorems, checked by Lean's kernel): request-head parsing, percent-decoding exactly once, path
normalisation, location selection, confinement of every file path to its root or
alias, that a served file belongs to a location whose auth_basic passed,
header rendering without line breaks, byte ranges, gzip round-trips, the path sent to a proxy.
Not proved, only tested: the socket loop, timeouts and connection limits, file reads, the TLS connection loop, the Lean runtime and libuv underneath, the Linux kernel and the machine.