Nmap Development mailing list archives

Re: default host detection


From: Robin Wood <robin@digi.ninja>
Date: Wed, 10 May 2017 07:12:10 +0000

I wonder how many hosts are missed from people not knowing that. Glad I've
got a host discovery script I run as root before everything else.

Would be cool to have a .nmaprc file where you can set defaults for things
like this to this.

Robin

On Wed, 10 May 2017, 02:16 David Fifield, <david () bamsoftware com> wrote:

On Tue, May 09, 2017 at 08:08:51PM +0000, Robin Wood wrote:
If I run the command

nmap -p 445 1.2.3.4

what host detection should nmap use to decide if the host is up before it
checks the ports? I would have assumed that one of the checks would be
to ping
it but if you look at the attached screenshot, I ping the host and get a
reply,
nmap then says that it is down, I ping again, still have replies, I then
scan
with -P0 and I get the response I'm expecting, that the port is open.

If you're running as nonroot, then host discovery is just a connect
request to ports 80 and 443. ICMP echo only happens when running as
root.

If you want to use different ports for host discovery, you can do it
like this:
        nmap -PS445,9999 1.2.3.4

--packet-trace will show exactly what probes are being sent.

_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/

Current thread: