Certified Ethical Hacker (CEH) Practice Question

While assessing an e-commerce site, you inject a single quote into the productId parameter and receive the message "Incorrect syntax near '1'." This confirms a classic error-based SQL injection point. To build a UNION-based exploit, you first need to discover how many columns the original query returns. What is the most reliable next action to obtain that information?

  • Send WAITFOR DELAY '0:0:5' to measure a five-second pause and confirm time-based injection.

  • Terminate the original query with /* comment tags */ to suppress the database error and retrieve the page normally.

  • Iteratively append ORDER BY n-- comments, increasing n until an error occurs, to pinpoint the exact column count.

  • Blindly add a UNION SELECT NULL,NULL,NULL-- payload and see if the page renders without error.

Certified Ethical Hacker (CEH)
Web Application Hacking
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot