nerdexam
EC-Council

312-50V11 · 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 reliable and universally applicable character for quickly detecting SQL injection because it directly breaks standard SQL string syntax and triggers database errors.

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

(17 responses)
  • A
    6% (1)
  • D
    94% (16)

Why each option

The single quotation mark is the most reliable and universally applicable character for quickly detecting SQL injection because it directly breaks standard SQL string syntax and triggers database errors.

ADouble quotation

Double quotation marks serve as identifier delimiters in ANSI SQL and only act as string delimiters in certain non-standard database configurations, making them unreliable for universal quick validation.

BBackslash

A backslash functions as an escape character in some database-specific contexts but is not a standard SQL string boundary character and does not reliably trigger syntax errors across database platforms.

CSemicolon

A semicolon can be used to chain stacked queries in SQL injection but does not immediately break string parsing to produce an observable syntax error the way a single quote does.

DSingle quotationCorrect

SQL uses the single quote as the standard string delimiter across virtually all major database engines including MySQL, MSSQL, Oracle, and PostgreSQL. Injecting a single quote into a parameter causes the database to interpret it as an unmatched string terminator, generating a syntax error that confirms the application is passing unsanitized input directly into SQL queries and is therefore vulnerable to injection.

Concept tested: SQL injection detection using single-quote character

Source: https://owasp.org/www-community/attacks/SQL_Injection

Topics

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

Community Discussion

No community discussion yet for this question.

Full 312-50V11 Practice