nerdexam
EC-Council

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.

SQL Injection

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)
  • A
    3% (1)
  • B
    3% (1)
  • D
    95% (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.

ADouble quotation

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.

BBackslash

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.

CSemicolon

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.

DSingle quotationCorrect

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

#SQL injection#single quote#input validation#web application testing

Community Discussion

No community discussion yet for this question.

Full 312-50V10 Practice