Skip to content

Parallelize forward DNS name resolution #1451

@dmiller-nmap

Description

@dmiller-nmap

This is a known source of slowness that should have been made a tracking issue long ago.

Nmap has a fast parallel DNS resolver, but it currently only works for PTR requests. For forward lookups (such as a list of domain names provided via -iL), it uses the system's own blocking resolver. We could really speed up scanning if we did these in batches instead, but it will require some re-engineering of how Nmap processes target inputs:

  • Currently, name resolution is done in the various subclasses of NetBlock in TargetGroup.cc. This is to handle cases like example.com/24 (scan the /24 CIDR block that contains the address for "example.com").
  • We'll likely need to implement a different intermediate class that takes target specifications and returns a stream/list/queue of net blocks.
  • We need to extend the parallel DNS resolver in nmap_dns.cc to handle different request types. This functionality could be useful in other areas of Nmap, too, but don't worry about that yet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions