What is the defining mechanism of Structured Query Language (SQL) injection?
Answer
Untrusted input changes the meaning or structure of a database query
Explanation
### Why this is right
Injection occurs when application input is interpreted as part of a database command rather than only as data. The altered query can then perform an action the application developer did not intend.
### The concept
A database-backed application often constructs a query using values supplied by a user. If those values are inserted unsafely, special input can alter the query's logic. Parameterized queries prevent this by separating instructions from values.
### The other options
- **B. A database automatically encrypts stored information**: encryption concerns protecting data confidentiality, not changing query structure.
- **C. A firewall prevents every request from reaching an application**: firewalls filter traffic, but do not define SQL injection.
- **D. A user downloads a database backup through an approved interface**: this is an authorized data operation, not injection by itself.
### Terms
- **SQL**: Structured Query Language, used to interact with relational databases.
- **Untrusted input**: data supplied by a source that the application cannot assume is safe.
### Remember
Injection happens when input is treated as command syntax.
Related Questions
- A database-backed application needs to stop showing detailed database errors to ordinary users while retaining information for investigation. Which approach best matches the lesson?(intermediate)
- Regular security audits and penetration tests can help identify and fix application weaknesses before attackers exploit them.(basic)
- A Web Application Firewall (WAF) should be treated as a replacement for secure query construction.(basic)
- A database account should have only the permissions required for its task. This is the principle of _____.(basic)
- In blind Structured Query Language (SQL) injection, the attacker cannot directly see the result and instead infers information from application behavior.(basic)
Want to practice more questions like this?
Join myBenkio free and practice past questions for your Nigerian university courses with AI explanations for every answer.
Start Practicing Free