nerdexam
EC-Council

312-50V11 · Question #102

If an attacker uses the command SELECT*FROM user WHERE name = x' AND userid IS NULL; --; which type of SQL injection attack is the attacker performing?

The correct answer is D. Tautology. The injected condition uses a clause that evaluates to true based on a NULL comparison, classifying this as a tautology-based SQL injection attack.

SQL Injection

Question

If an attacker uses the command SELECT*FROM user WHERE name = x' AND userid IS NULL; --; which type of SQL injection attack is the attacker performing?

Options

  • AEnd of Line Comment
  • BUNION SQL Injection
  • CIllegal/Logically Incorrect Query
  • DTautology

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    14% (5)
  • C
    5% (2)
  • D
    78% (29)

Why each option

The injected condition uses a clause that evaluates to true based on a NULL comparison, classifying this as a tautology-based SQL injection attack.

AEnd of Line Comment

End-of-line comment injection uses `--` as the primary attack mechanism to strip query logic, but here the `--` is a supporting element rather than the core technique driving unauthorized data retrieval.

BUNION SQL Injection

UNION SQL injection appends a UNION SELECT statement to merge results from a second query, which is not present in this command.

CIllegal/Logically Incorrect Query

Illegal or logically incorrect query injection deliberately causes database errors to extract schema information from error messages, which is not the goal of this specific payload.

DTautologyCorrect

A tautology attack injects a WHERE clause condition designed to always evaluate to true or to manipulate query logic in the attacker's favor. The condition `userid IS NULL` exploits the fact that NULL IS NULL evaluates to TRUE in SQL, and the appended `--` comments out the remainder of the original query, neutralizing any closing syntax. Together, these manipulate the query's logical outcome to bypass intended filtering, which is the hallmark of tautology injection.

Concept tested: Tautology-based SQL injection classification

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

Topics

#SQL injection#tautology#comment injection#authentication bypass

Community Discussion

No community discussion yet for this question.

Full 312-50V11 Practice