Ich verwende nmap in einem meiner daily-cron-Scripte um die lokalen Netzwerkinterfaces auf meinem Server abzuklopfen. Seit einigen Tagen laufen diese Scripte nicht mehr richtig. Nach etwas Recherche habe ich herausgefunden, dass nmap ein eigenartiger Verhalten an den Tag legt:
Wenn ich nmap als Root starte, dann laufen die Scans immer als SYN Stealth-Scan, als normaler Nutzer jedoch nicht. Beispiel: Scan auf localhost als root:
Code: Select all
nmap -vvv localhost -p 25
Starting Nmap 4.68 ( http://nmap.org ) at 2009-02-26 12:35 CET
Initiating SYN Stealth Scan at 12:35
Scanning localhost (127.0.0.1) [1 port]
Completed SYN Stealth Scan at 12:35, 2.04s elapsed (1 total ports)
Host localhost (127.0.0.1) appears to be up ... good.
Scanned at 2009-02-26 12:35:11 CET for 2s
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
25/tcp filtered smtp
Code: Select all
nmap -vvv localhost -p 25
Starting Nmap 4.68 ( http://nmap.org ) at 2009-02-26 12:35 CET
Initiating Ping Scan at 12:35
Scanning 127.0.0.1 [1 port]
Completed Ping Scan at 12:35, 0.00s elapsed (1 total hosts)
Initiating Connect Scan at 12:35
Scanning localhost (127.0.0.1) [1 port]
Discovered open port 25/tcp on 127.0.0.1
Completed Connect Scan at 12:35, 0.00s elapsed (1 total ports)
Host localhost (127.0.0.1) appears to be up ... good.
Scanned at 2009-02-26 12:35:31 CET for 0s
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
25/tcp open smtp
Wie kann das sein, dass das nmap bei identischem Aufruf einmal einen SYN Stealth-Scan und einmal einen normalen Scan durchführt? Das gleiche Problem habe ich übrigens auch, wenn ich eine externe IP scanne, und nicht nur localhost.
Grüße
Nico