Recall & Review
beginner
What is SQL injection?
SQL injection is a security vulnerability where an attacker inserts malicious SQL code into a query, allowing unauthorized access or manipulation of a database.
Click to reveal answer
beginner
How does SQL injection typically happen?
It happens when user input is directly included in SQL queries without proper checks or cleaning, letting attackers add harmful commands.
Click to reveal answer
beginner
Name one common way to prevent SQL injection.
Using prepared statements or parameterized queries, which separate code from data, preventing attackers from changing the query structure.
Click to reveal answer
intermediate
What could be a real-life impact of a successful SQL injection attack?
Attackers might steal sensitive data like passwords, delete important information, or take control of the entire database.
Click to reveal answer
intermediate
Why is input validation alone not enough to stop SQL injection?
Because attackers can find ways to bypass simple checks; combining input validation with prepared statements is safer.
Click to reveal answer
What does SQL injection allow an attacker to do?
✗ Incorrect
SQL injection lets attackers run harmful commands on the database without permission.
Which practice helps prevent SQL injection?
✗ Incorrect
Prepared statements keep code and data separate, stopping attackers from injecting harmful SQL.
SQL injection attacks usually target which part of an application?
✗ Incorrect
SQL injection targets the database queries that use user input.
What is a sign that a website might be vulnerable to SQL injection?
✗ Incorrect
Detailed error messages can reveal database info that attackers use to exploit SQL injection.
Which of these is NOT a good defense against SQL injection?
✗ Incorrect
Disabling firewalls weakens security and does not help prevent SQL injection.
Explain what SQL injection is and why it is dangerous.
Think about how attackers use input fields to run harmful database commands.
You got /3 concepts.
Describe at least two methods to prevent SQL injection attacks.
Consider how separating code from data and checking inputs helps.
You got /3 concepts.