nerdexam
GIAC

GCIH · Question #337

Which special character or character sequence is often used in SQL injection attacks because it acts as a SQL comment delimiter?

The correct answer is B. '. The single quote (') is the most fundamental and commonly used character in SQL injection attacks. It is used to break out of the string literal context in SQL queries - for example, injecting ' OR '1'='1 into a login field manipulates the query logic. While the question…

Web Application Attacks & Post-Exploitation

Question

Which special character or character sequence is often used in SQL injection attacks because it acts as a SQL comment delimiter?

Options

  • A--
  • B'
  • C
  • D;
  • E../

How the community answered

(58 responses)
  • A
    3% (2)
  • B
    88% (51)
  • C
    7% (4)
  • D
    2% (1)

Explanation

The single quote (') is the most fundamental and commonly used character in SQL injection attacks. It is used to break out of the string literal context in SQL queries - for example, injecting ' OR '1'='1 into a login field manipulates the query logic. While the question references 'comment delimiter' (which technically describes the double-dash -- in option A), the single quote is THE foundational SQL injection character because it terminates the intended string, allowing an attacker to append arbitrary SQL. The double-dash (--) is used to comment out the rest of a query after injection, but the single quote is what initiates the injection in the first place and is by far the most universally exploited character in SQL injection. Note: if the question strictly means 'comment delimiter,' that would be --, but exam contexts often identify (') as the primary SQL injection trigger character.

Topics

#SQL injection#comment delimiter#single quote#injection syntax

Community Discussion

No community discussion yet for this question.

Full GCIH Practice