Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the DNS server used for hostname resolution #1600

Open
AresS31 opened this issue May 20, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@AresS31
Copy link

commented May 20, 2019

It would be nice if in any of the log files (normal, xml or greppable) the DNS server used for the resolution is being logged. I am aware that per default nmap uses the DNS specified in /etc/resolv.conf however, in some engagement the tester may forget to take a note of the content of this file and therefore may need it at a later stage and being able to fetch from nmap log files would be super cool!

@dmiller-nmap

This comment has been minimized.

Copy link

commented May 20, 2019

This is a neat idea. Nmap currently only manages DNS servers used for reverse-DNS, so that's what we'd have to focus on. Forward lookups (e.g. resolving example.com to 93.184.216.34) are done with system calls, so we don't have info about how that lookup is done (e.g. hosts file, DNS, WINS, etc.).

Since Nmap distributes its requests across the available DNS servers, would it be sufficient to have one output line listing the configured servers at the beginning, or would you need to know exactly which server provided the reverse name for each target in particular?

@AresS31

This comment has been minimized.

Copy link
Author

commented May 20, 2019

Both options would be acceptable. However, I believe that the second option is the best as it would provide detailed information on a per target basis. This could be valuable for troubleshooting potential issues at a later point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.