Skip to main content

Settings

Color Mode

Theme Skin

Background

Appearance preferences are saved in this browser only.

Environment

Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links

Theme & Build

Jekyll v3.10.0
Last BuildNov 24, 17:25

Page Location

Page Info

Layout default
Collection wargames
Path _wargames/natas/natas14.md
URL /wargames/natas/natas14/
Date 2026-04-07

Natas Level 14

Natas Level 14 — a login form builds its SQL query by pasting in your input; learn the basics of SQL injection and authentication bypass.

Table of Contents

Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.

Username: natas14
URL:      http://natas14.natas.labs.overthewire.org

Study guide

Level map: sign in as natas14 and find the password for natas15.

What this level teaches

SQL injection: input that changes the meaning of a database query.

Key ideas

  • String concatenation is the flaw. The code inserts the username and password directly into a query string, so quotes in your input can end the string and add logic.
  • Boolean logic. A condition such as 1=1 is always true, so a WHERE clause containing OR of it matches every row.
  • Comments. SQL comment markers can discard the remainder of a query.
  • Read the source. The page provides it; the exact query shape tells you what to inject.

How to approach it

  1. Read the query the code builds and imagine the final text for ordinary input.
  2. Work out how to complete or break out of the quoted strings to make the check always succeed.

How developers prevent it

Use parameterised queries (prepared statements) so input is always data, never SQL.