====== nmap ====== Will man etwas leistungfähiges, womit man gleich mehrere Ports und IP-Bereiche scannen kann, dann nimmt man lieber **nmap**: > nmap 192.168.1.111 Starting Nmap 5.21 ( http://nmap.org ) at 2010-04-25 12:31 CEST Nmap scan report for host111.domain.de (192.168.1.111) Host is up (0.0027s latency). Not shown: 998 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp open rpcbind > nmap -sC -sV -p- 192.168.1.111 > nmap 192.168.1.200-210 Starting Nmap 5.21 ( http://nmap.org ) at 2010-04-25 12:39 CEST Nmap scan report for host204.domain.de (192.168.1.204) Host is up (0.0027s latency). Not shown: 998 closed ports PORT STATE SERVICE 22/tcp open ssh 111/tcp open rpcbind Um doppelt sicherzugehen, dass Ihre Firewall intakt ist, können Sie überprüfen, welche Ports geöffnet sind (''-p-'' says 'scan all ports, 1-65535) hierzu können Sie ''nmap'' wie folgt nutzen: > nmap -p- 192.168.1.111 schneller Netzwerkscan (nur als //root//): > nmap -PO2 192.168.1.200-210 > nmap -PO4 192.168.1.200-210 schneller Netzwerkscan (als unprev. Benutzer): > nmap -PP 192.168.1.200-210 > nmap -PM 192.168.1.200-210 MAC-Adressen im Netz ermitteln: > nmap -sP -n 192.168.1.0/24 offene SSH-Ports Netz anzeigen: > nmap -n -p 22 -sT 192.168.1.0/24 verfühgbare ciphers Netz ausgeben: > nmap --script ssl-enum-ciphers -p 443 192.168.1.0/24 [[http://nmap.org/book/man.html|man nmap]] > nmap -v -A scanme.nmap.org > nmap -v -sP 192.168.0.0/16 10.0.0.0/8 > nmap -v -iR 10000 -PN -p 80 Installiert wird nmap in **FreeBSD** mit: > portinstall -prO security/nmap Installiert wird nmap in **Ubuntu** mit: > aptitude install nmap ==== nmap-Problem ==== * [[https://github.com/DataSoft/Nova/issues/342]] * [[http://yurisk.info/2009/12/15/arp-table-overflow-in-checkpoint-nad-linux-in-general/]] * [[https://github.com/DataSoft/Nova/commit/1141f3f7f27c1dcf3f3d47d5fbf1c03bb52be8f2]] ein Class-B-Netz ist für die derzeitigen Voreinstellungen zu groß: > nmap -n -p 22 -sT 10.30.0.0/16 Starting Nmap 5.00 ( http://nmap.org ) at 2013-06-26 15:40 CEST Strange error from connect (105):No buffer space available eine Lösung für das Problem sind diese Einstellungen: > vi /etc/sysctl.conf ... # Default: net.ipv4.neigh.default.gc_thresh1 = 128 net.ipv4.neigh.default.gc_thresh1 = 1024 # Default: net.ipv4.neigh.default.gc_thresh2 = 512 net.ipv4.neigh.default.gc_thresh2 = 4096 # Default: net.ipv4.neigh.default.gc_thresh3 = 1024 net.ipv4.neigh.default.gc_thresh3 = 65536