🔒 Academy Room 2 · Medium

SQL Injection (SQLi)

Learn SQL injection the way it's actually found — hands-on, against a live target. Detect, exploit, and report SQLi on CorvusBank, a realistic fake fintech portal, in PhantomRed Academy.

⚡ Start the SQLi Lab How it works →
// Overview

What Is SQL Injection?

SQL injection happens when untrusted input is stitched directly into a database query. Instead of being handled as plain data, the input is parsed as part of the SQL statement — so an attacker who understands the query's shape can rewrite its logic, turning a login box or a search field into a window onto the entire database.

It is one of the oldest vulnerability classes on the web and still one of the most damaging, because it lands squarely on the data layer. A single injectable parameter can expose customer records, credentials, and internal tables that the application was never meant to reveal.

// Why It Matters

Real-World Impact

Data Exposure

Read what you shouldn't

A working injection can return rows far beyond what the feature intended — other users' records, password hashes, entire tables — simply by extending the query the application already runs.

Auth & Integrity

Bypass and tamper

Depending on the flaw, injection can subvert authentication logic, alter or delete stored data, and in some configurations reach the database host itself — escalating a web bug into full data-layer compromise.

// OWASP

Where SQL Injection Sits in the OWASP Top 10

SQL injection is the classic example of A03:2021 – Injection in the current OWASP Top 10. Injection has appeared in every edition of the list; it stays near the top because it maps so directly to the data an application is built to protect. The impact classes below are what earn confirmed SQLi a high-severity rating.

Impact What the attacker gains Severity
Data exfiltration Read arbitrary rows and tables from the database High
Authentication bypass Subvert login logic to access accounts High
Data tampering Modify or delete stored records High
Schema disclosure Enumerate database structure and metadata Medium
// The Workflow

How PhantomRed Fits Into a SQLi Assessment

SQL injection is one of the vulnerability classes automation handles well: a scanner can send crafted inputs, diff the responses, and flag an injectable parameter with a severity rating in minutes. That is exactly what Room 2 starts with — a real PhantomRed scan against CorvusBank that surfaces the finding for you to read.

But a finding is not a report. The human still confirms the impact, understands why the parameter is injectable, and writes up something a developer can act on. The room walks that full loop:

Prefer to see how the scanning half works on its own? The Nuclei automation workflows guide covers the template-driven detection PhantomRed builds on.

// What You'll Learn

Learning Objectives

Concepts

  • How input becomes SQL when queries aren't parameterized
  • Common ways injectable parameters are detected
  • How SQL injection maps onto the OWASP Top 10

Hands-On Skills

  • Running a scan and reading its SQLi finding
  • Interpreting severity and the injectable surface
  • Turning a raw finding into a reportable result
// FAQ

Frequently Asked Questions

What is SQL injection?
SQL injection is a vulnerability where untrusted input is concatenated into a database query, letting an attacker alter the query's logic. Instead of being treated as data, the input is interpreted as SQL, which can expose, modify, or destroy the data the application relies on. It appears anywhere user input reaches a query without safe parameterization.
Is SQL injection in the OWASP Top 10?
Yes. SQL injection falls under A03:2021 — Injection in the current OWASP Top 10. Injection has been a Top 10 category since the list's earliest versions because of how directly it exposes the data layer, and SQL injection remains its most recognizable form.
How is SQL injection exploited?
An attacker supplies input that breaks out of the intended string context in a query, then adds their own conditions or clauses to change what the database returns. Depending on the flaw, this can leak entire tables, bypass authentication, or reveal database structure. In the CorvusBank lab you practice detecting and confirming this against a live fintech-style portal.
What can an attacker achieve with SQL injection?
Impact ranges from reading data the user was never authorized to see — other customers' records, credentials, internal tables — to modifying or deleting data and, in some configurations, executing commands on the database host. Because it hits the data layer directly, SQL injection is consistently rated high severity.
Can an automated scanner detect SQL injection?
Yes — SQL injection is one of the vulnerability classes autonomous scanners are strongest at, because it can be probed by sending crafted inputs and comparing responses. PhantomRed surfaces the injectable surface and rates the finding; the human then confirms impact and writes the report. The room teaches both halves of that workflow.
How do you prevent SQL injection?
Use parameterized queries or prepared statements so input is always treated as data, never as SQL. Layer on least-privilege database accounts, input validation, and an ORM that parameterizes by default. Escaping strings by hand is error-prone and should not be the primary defense.
// Related

Related Rooms & Guides

// Get Started

Practice SQL Injection Against a Live Target

The CorvusBank lab is live and free to play. Run a real autonomous scan, read the SQLi finding it surfaces, then confirm and report the vulnerability end to end.

⚡ Open the SQLi Lab Start a Free Scan →