[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nmap -sP meldet nicht alle Hosts



Am 11.12.2011 22:01, schrieb Heiko Schlittermann:
> Hallo,
> 
> Thomas Schöpfer <t.schoepfer@tmx.ch> (Fr 09 Dez 2011 01:09:09
> CET):
>> Am 08.12.2011 22:34, schrieb Heiko Schlittermann:
>>>>> 
>> 
>> --send-ip und/oder --max-rate 1 brachte keine Verbesserung. Hab
>> auch mal versucht, das Interface mit -e eth0 festzulegen. Das
>> bringt auch keine Veränderung.
>> 
>>>> man nmap sagt auf Englisch : "- sP: ping scan  -  go no
>>>> further than determining if host is online."
>> 
>> Genau das erwarte ich. Eine Liste aller Hosts, die auf ping
>> antworten.
>> 
>>> Ja, das steht in der Kurz-Referenz. Für den OP interessanter
>>> halte ich den Satz, den man etwas weiter später im Manual
>>> findet (gegen Zeile 372, je nach Terminalbreite)
>>> 
>>> a connect call) to ports 80 and 443 on the target. When a 
>>> privileged user tries to scan targets on a local ethernet
>>> network, ARP requests are used unless --send-ip was specified.
>>> 
>>> ... und er probiert es ja in einem lokalen Netz. Unterstelle
>>> ich. Hat er leider nicht verraten.
>> 
>> Ich teste in einem 192.168.0.0/24er Netz. Der Host, von dem aus 
>> gescannt wird, hat die Adresse 192.168.0.251, läuft mit Debian 
>> Version 6.0.3.
>> 
>> Da steht auch noch: An exception to this is that an ARP scan is
>> used for any targets which are on a local ethernet network.
>> 
>> und weiter unten: Even if different ping types (such as -PE or
>> -PS) are specified, Nmap uses ARP instead for any of the targets
>> which are on the same LAN. If you absolutely don't want to do an
>> ARP scan, specify --send-ip.
>> 
>> Bewirkt nur nichts. Es sieht so aus, dass --send-ip ignoriert
>> wird.
> 
> Woher weißt Du das? Du meinst, es bewirkt keine Änderung in dem
> Scan oder in den Resultaten?

Ich weiss das nicht, ich nahm das nur an, da die Resultate sich nicht
sichtbar veränderten. Nun ist mir aufgefallen, dass die Scans ein
klein wenig länger dauern, wenn --send-ip aktiviert wird.

> --send-ip funktioniert nur mit Root-Rechten. Und ein ARP-Request
> geht dem natürlich auch voraus. Funktioniert es zuverlässiger, wenn
> Du den Scan auf die Hosts einschränkst, von denen Du weißt, daß sie
> online sind? - Das ist dann natürlich nicht die Lösung, aber es
> könnte einen Hinweis liefern, wo die Säge klemmt.
> 

Hier mal Resultate (etwas gekürzt) von meinem Heimnetz, wo 8 Hosts
auf ping antworten. nmap liefert keine wiederholbaren Resultate.
Ein Shell-Script, das die Hosts anpingt, bekommt immer von allen 8
Adressen eine Antwort.

Mit --send-ip, als root:
  # nmap -sP -n --send-ip -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:39 CET
  Nmap done: 8 IP addresses (7 hosts up) scanned in 2.01 seconds

  # nmap -sP -n --send-ip -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:39 CET
  Nmap done: 8 IP addresses (6 hosts up) scanned in 1.61 seconds

  # nmap -sP -n --send-ip -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:39 CET
  Nmap done: 8 IP addresses (7 hosts up) scanned in 1.79 seconds


Ohne --send-ip, als root:
  # nmap -sP -n -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:36 CET
  Nmap done: 8 IP addresses (6 hosts up) scanned in 1.10 seconds

  # nmap -sP -n -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:36 CET
  Nmap done: 8 IP addresses (7 hosts up) scanned in 1.35 seconds

  # nmap -sP -n -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:36 CET
  Nmap done: 8 IP addresses (5 hosts up) scanned in 0.61 seconds


Hier zb. behauptet nmap, dass der Host mit der IP 192.168.16.203
down ist. Er antwortet aber auf ping.

  # nmap -sP -n -v --send-ip -iL ip-list
  Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-12 00:58 CET
  NSE: Loaded 0 scripts for scanning.
  Initiating Ping Scan at 00:58
  Scanning 2 hosts [4 ports/host]
  Completed Ping Scan at 00:58, 0.08s elapsed (2 total hosts)
  Host 192.168.16.1 is up (0.00026s latency).
  Host 192.168.16.3 is up (0.00031s latency).
  Host 192.168.16.202 is up.
  Initiating Ping Scan at 00:58
  Scanning 5 hosts [4 ports/host]
  Completed Ping Scan at 00:58, 1.44s elapsed (5 total hosts)
  Host 192.168.16.203 is down.
  Host 192.168.16.213 is up (0.0035s latency).
  Host 192.168.16.226 is up (0.0016s latency).
  Host 192.168.16.227 is up (0.17s latency).
  Host 192.168.16.229 is up (0.11s latency).
  Read data files from: /usr/share/nmap
  Nmap done: 8 IP addresses (7 hosts up) scanned in 1.79 seconds
             Raw packets sent: 29 (1096B) | Rcvd: 14 (500B)

  # ping 192.168.16.203
  PING 192.168.16.203 (192.168.16.203) 56(84) bytes of data.
  64 bytes from 192.168.16.203: icmp_seq=1 ttl=64 time=0.050 ms
  64 bytes from 192.168.16.203: icmp_seq=2 ttl=64 time=0.044 ms
  64 bytes from 192.168.16.203: icmp_seq=3 ttl=64 time=0.033 ms
  ^C
  --- 192.168.16.203 ping statistics ---
  3 packets transmitted, 3 received, 0% packet loss, time 1998ms
  rtt min/avg/max/mdev = 0.033/0.042/0.050/0.008 ms




Reply to: