Certified Ethical Hacker (CEH v12) — Question 226
While performing a security audit of a web application, an ethical hacker discovers a potential vulnerability. The application responds to logically incorrect queries with detailed error messages that divulge the underlying database's structure. The ethical hacker decides to exploit this vulnerability further. Which type of SQL Injection attack is the ethical hacker likely to use?
Answer options
- A. UNION SQL Injection
- B. Error-based SQL Injection
- C. In-band SQL Injection
- D. Blind/Inferential SQL Injection
Correct answer: B
Explanation
The correct answer is B, Error-based SQL Injection, as it specifically utilizes error messages to glean information about the database structure. Other options, while related to SQL Injection, do not directly rely on the detailed error messages provided by the application. UNION SQL Injection (A) focuses on combining results from multiple queries, In-band SQL Injection (C) refers to direct data retrieval using existing channels, and Blind/Inferential SQL Injection (D) does not rely on error messages at all.