Courseiva
Footprinting, Reconnaissance and ScanningmediumMultiple ChoiceObjective-mapped

CEH Footprinting, Reconnaissance and Scanning Practice Question

A security analyst is performing reconnaissance on a target domain and wants to discover all subdomains using DNS enumeration. Which of the following commands would be MOST effective for performing a DNS zone transfer attempt?

⚠ Common exam trap

Candidates often confuse general DNS queries (like `dig ANY` or `nslookup -type=ns`) with the specific zone transfer request (AXFR), assuming any DNS enumeration command can retrieve the full zone file.

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

dnsrecon -d example.com -t axfr

The `-t axfr` flag in `dnsrecon` specifically attempts a DNS zone transfer (AXFR query) against the target domain's authoritative nameservers. A successful zone transfer returns all DNS records, including all subdomains, making it the most direct and effective method for subdomain enumeration via DNS zone transfer.

Answer analysis

Option-by-option breakdown

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

  • dig example.com ANY

    Why it's wrong here

    The `dig example.com ANY` command performs a standard DNS query for all record types (A, MX, NS, SOA, etc.) that are publicly available for the specified domain. While comprehensive in its record type retrieval, this command does not initiate an AXFR (Asynchronous Full Zone Transfer) request. A zone transfer is a distinct operation designed to replicate the entire zone file, requiring specific flags like `+axfr` or `-t AXFR` with tools like `dig` or `host`.

  • nslookup -type=ns example.com

    Why it's wrong here

    Executing `nslookup -type=ns example.com` specifically queries for the Name Server (NS) records associated with `example.com`. This command is useful for identifying the authoritative DNS servers responsible for the domain, which is a foundational step in reconnaissance. However, it only retrieves a list of name servers and does not attempt to download the complete zone file containing all host, mail exchanger, and other detailed records, which is the objective of a zone transfer.

  • theHarvester -d example.com -l 500 -b google

    Why it's wrong here

    `theHarvester` is an open-source intelligence (OSINT) tool primarily used for gathering publicly available information such as subdomains, email addresses, and virtual hosts. By leveraging search engines like Google, PGP key servers, and other public data sources, it passively collects data. This tool does not directly interact with DNS servers to request a zone transfer; instead, its methodology relies on scraping and correlating information already indexed or exposed on the internet.

  • dnsrecon -d example.com -t axfr

    Why this is correct

    The `dnsrecon` utility, when invoked with the `-t axfr` flag, explicitly instructs the tool to attempt an AXFR (Asynchronous Full Zone Transfer) against the target domain. This command is specifically designed to enumerate all DNS records within a zone by requesting the entire zone file from the authoritative name servers. If successful due to misconfiguration, this provides a comprehensive map of the domain's infrastructure, including hostnames and IP addresses, which is highly valuable for reconnaissance.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This CEH question is part of Courseiva's 870-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.