Natas Level 15
Natas Level 15 — the application only answers "exists" or "does not exist"; learn blind boolean SQL injection and how to automate it.
Table of Contents
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Username: natas15
URL: http://natas15.natas.labs.overthewire.org
Study guide
Level map: sign in as natas15 and find the password for natas16.
What this level teaches
Extracting data one true/false question at a time when the application never prints query results.
Key ideas
- Blind injection. You cannot see data, but you can see whether a condition was true.
- Oracle. Each request asks a yes/no question such as “does the password start with this letter?”.
- Binary search or character-by-character. With a good strategy, a short script finds a 32-character password in a few hundred requests.
- Automation. Write the loop in Python with
requestsandstring.ascii_letters; doing it by hand is impractical.
How to approach it
- Confirm the injection works by making the page answer differently for a true and a false condition.
- Ask the database about one character at a time using functions such as
SUBSTRINGorLIKE. - Automate, and print progress as you go.
How developers prevent it
Parameterised queries again, plus rate limiting and monitoring for bursts of near-identical requests.