Courseiva
Web Application and Injection AttacksmediumMultiple ChoiceObjective-mapped

CEH Web Application and Injection Attacks Practice Question

A penetration tester is using SQLMap to automate exploitation of a SQL injection vulnerability found in a login form. The tester wants to retrieve the names of all databases on the backend MySQL server. Which SQLMap flag should be used?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

--dbs

The --dbs flag in SQLMap enumerates all databases on the database server.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • --dbs

    Why this is correct

    The --dbs option is the correct command-line switch in sqlmap for enumerating and displaying the names of all available databases on the target database management system (DBMS) server. It leverages identified SQL injection vulnerabilities to extract this high-level structural information, providing a foundational understanding of the server's data organization. This is a crucial initial step in reconnaissance for a penetration tester, revealing the scope of potential data stores.

  • --current-db

    Why it's wrong here

    The --current-db option in sqlmap is specifically used to retrieve the name of the database that the web application is currently connected to and interacting with. It does not enumerate or list all other databases present on the server, thus failing to provide a comprehensive overview of the entire DBMS landscape. This command focuses on the immediate context of the application's connection rather than broader discovery of all available databases.

  • --schema

    Why it's wrong here

    The --schema option is employed to dump the entire database schema, which includes not only database names but also detailed information about tables, columns, their data types, and relationships within the specified database(s). This command provides a much more granular and extensive output than merely listing database names, making it too broad for the specific task of just listing databases. It's typically used for deeper enumeration after initial database discovery.

  • --tables

    Why it's wrong here

    The --tables option is used to enumerate and list all tables that exist within a *specific* database, which must typically be identified beforehand using other commands like --dbs. This command operates at a lower level of granularity than listing databases, focusing on the contents of an already selected database rather than discovering the top-level database containers themselves. It requires prior knowledge or discovery of a database name to function effectively.

About these practice questions

One of 870 original CEH practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.