$ nmap localhost
Starting nmap ( http://www.insecure.org/nmap/ )
Interesting ports on localhost (127.0.0.1):
(The 1649 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop-3
143/tcp open imap
515/tcp open printer
993/tcp open imaps
5432/tcp open postgres
Nmap run completed -- 1 IP address (1 host up) scanned in 0.815 seconds
$
# nmap -sS 10.0.0.1
Starting nmap ( http://www.insecure.org/nmap/ )
Interesting ports on 10.0.0.1 (10.0.0.1):
(The 1649 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop-3
143/tcp open imap
515/tcp open printer
993/tcp open imaps
5432/tcp open postgres
Nmap run completed -- 1 IP address (1 host up) scanned in 0.787 seconds
#
手工端口扫描
这里有一个非常时髦的工具叫做"hping"(http://www.hping.org)
给出一个例子:
devil:~# hping -S -p 79 tosca
HPING tosca (eth0 192.168.9.1): S set, 40 headers 0 data bytes
len=46 ip=192.168.9.1 ttl=64 DF id=2869 sport=79 flags=RA seq=0 win=0 rtt=0.3 ms
len=46 ip=192.168.9.1 ttl=64 DF id=2870 sport=79 flags=RA seq=1 win=0 rtt=0.4 ms
--- tosca hping statistic ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.3/0.4/0.4 ms
devil:~#
正如你看到的那样,返回了RST和ACK的包.
好了开始下一个主题: 开始之前废话几句,我写这篇文章的目的是以黑客的角度来分析UNIX的入侵技术,为什么要以这个角度写呢,因为网络管理员必须要知道黑客的手法才能更好的防守.所以我写本文的目的是更好的防守,因为我比较喜欢UNIX,我最讨厌windows那种不开放源代码的作风....好了继续吧.不发牢骚了
5.3.4. OS 探测
# nmap -P0 -sS -O 192.168.0.1
Starting nmap ( http://www.insecure.org/nmap/ )
Warning: OS detection will be MUCH less reliable because we did not find
at least 1 open and 1 closed TCP port
Interesting ports on server (192.168.0.1):
(The 1655 ports scanned but not shown below are in state: filtered)
PORT STATE SERVICE
21/tcp open ftp
23/tcp open telnet
Device type: general purpose
Running (JUST GUESSING) : DEC OpenVMS 7.X (90%), Compaq Tru64 UNIX 5.X (88%)
Aggressive OS guesses: DEC OpenVMS 7.3 (Compaq TCP/IP 5.3) (90%),
DEC OpenVMS 7.3 (Alpha) TCP/IP 5.3 (88%), Compaq Tru64 UNIX V5.1 (Rev. 732) (88%), Compaq Tru64 UNIX V5.1A (Rev.
No exact OS matches for host (test conditions non-ideal).
Nmap run completed -- 1 IP address (1 host up) scanned in 284.404 seconds
$ telnet server
Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is ’^]’.
Welcome to OpenVMS (TM) Alpha Operating System, Version V7.3-2
Username: [SSL not available]