312-50V10 · Question #78
You are looking for SQL injection vulnerability by sending a special character to web applications. Which of the following is the most useful for quick validation?
The correct answer is D. Single quotation. The single quotation mark is the most effective character for quickly probing SQL injection because it directly terminates a string literal in SQL syntax, often causing a visible database error that confirms the vulnerability.
Question
You are looking for SQL injection vulnerability by sending a special character to web applications. Which of the following is the most useful for quick validation?
Options
- ADouble quotation
- BBackslash
- CSemicolon
- DSingle quotation
How the community answered
(39 responses)- A3% (1)
- B3% (1)
- D95% (37)
Why each option
The single quotation mark is the most effective character for quickly probing SQL injection because it directly terminates a string literal in SQL syntax, often causing a visible database error that confirms the vulnerability.
Double quotation marks are string delimiters only in certain databases (e.g., PostgreSQL in ANSI mode) and are far less universally effective as a quick probe.
Backslash is an escape character in some databases but does not directly break SQL string parsing syntax in a way that reliably triggers injection errors.
Semicolons are used to terminate and chain SQL statements (stacked queries) but do not by themselves break string context or produce the immediate syntax errors useful for quick detection.
SQL parsers treat a single quote as the string delimiter, so injecting one into an unsanitized input breaks the query syntax and typically returns a database error (e.g., 'You have an error in your SQL syntax'). This immediate, observable error response makes it the fastest and most universal first indicator of SQL injection susceptibility across virtually all SQL database engines.
Concept tested: SQL injection initial detection using single quote
Source: https://owasp.org/www-community/attacks/SQL_Injection
Topics
Community Discussion
No community discussion yet for this question.