nmap に関するインストールメモ(2002/04/09) 
 

nmap  とは

nmapは、ポートスキャンソフトです(きっぱり!)。と聞くと悪い方の使い方を思い浮かべて(他人のサイトをチェックするとか)しまうかもしれませんが、使い様によっては、現在自分がどのサービスを行っているのか? サービスを行っているハズなんだけど、うまくいかない、なんて時に使うと非常に便利です。
※他人のホストに nmap をかけることは、れっきとりた犯罪ですのでやめましょう (ーー゛)

   本家 : http://www.insecure.org/nmap/

nmapの設定方法

1.snmpをインストールします。

% cd /opt/local/src
% wget http://download.insecure.org/nmap/dist/nmap-2.54BETA31.tgz
% gzip -cd nmap-2.54BETA31.tgz | tar xf - 
% cd nmap-2.54BETA31
% ./configure
% make
   nmapfe.c:59: #error "Your system does not appear to have GTK (www.gtk.org) installed. Thus the Nmap X Front End will not compile. You should still be able to use Nmap the normal way (via text console). GUIs are for wimps anyway :)"
   make[1]: *** [nmapfe.o] Error 1
   make[1]: Leaving directory `/opt/local/src/nmap-2.54BETA31/nmapfe'
   make: [nmapfe/nmapfe] Error 2 (ignored)
   END OF SECTION WHERE FAILURES ARE OK

   と表示されますが、GUI(gtk)で使用しないのであれば特に問題ありません
% su
# make install

2.使用方法と実行イメージです。

# ./nmap localhost

Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
WARNING! The following files exist and are readable: /usr/local/share/nmap/nmap-services and ./nmap
-services. I am choosing /usr/local/share/nmap/nmap-services for security reasons. set NMAPDIR=. t
o give priority to files in your local directory
Warning: You are not root -- using TCP pingscan rather than ICMP
Interesting ports on localhost (127.0.0.1):
(The 1515 ports scanned but not shown below are in state: closed)
Port State Service
7/tcp open echo
9/tcp open discard
13/tcp open daytime
19/tcp open chargen
21/tcp open ftp
23/tcp open telnet
25/tcp open smtp
37/tcp open time
79/tcp open finger
80/tcp open http
111/tcp open sunrpc
139/tcp open netbios-ssn
443/tcp open https
512/tcp open exec
513/tcp open login
514/tcp open shell
515/tcp open printer
540/tcp open uucp
587/tcp open submission
898/tcp open unknown
901/tcp open samba-swat
1521/tcp open oracle
1526/tcp open pdap-np
2049/tcp open nfs
4045/tcp open lockd
5432/tcp open postgres
6000/tcp open X11
6112/tcp open dtspc
7100/tcp open font-service
10000/tcp open snet-sensor-mgmt
22273/tcp open wnn6
32771/tcp open sometimes-rpc5
32772/tcp open sometimes-rpc7
32773/tcp open sometimes-rpc9
32774/tcp open sometimes-rpc11
32775/tcp open sometimes-rpc13
32777/tcp open sometimes-rpc17
32779/tcp open sometimes-rpc21
32786/tcp open sometimes-rpc25