Think before you speak, read before you think.

linux工具之nmap

http://en.wikipedia.org/wiki/Nmap

The Network Mapper

  • 安装nmap:
apt-get install nmap
  • 检查我所在网段有多少台“活着”的机器(P代表ping)
root@debian:~# nmap -sP 219.xxx.xxx.0/24          #可以查看到MAC地址
  • 查看本机0-1000都开放了什么端口
root@debian:~# nmap -p 0-1000 localhost
    • 查看同网段哪些开了 3389 端口
    root@debian:~# nmap 192.168.1.0/24 -p 3389
    • 检查我本身的机器开放了哪些端口(T代表Tcp,U代表Udp)
    root@debian:~# nmap -sTU localhost

    参数说明:
    1.SYN扫描,又称为半开放扫描,它不打开一个完全的TCP连接,执行得很快:

    nmap -sS 192.168.32.0/24

    2.当SYN扫描不能用时,TCP Connect()扫描就是默认的TCP扫描:

     nmap -sT 192.168.32.0/24

    3.UDP扫描用-sU选项,UDP扫描发送空的(没有数据)UDP报头到每个目标端口:

     nmap -sU 192.168.32.0/24

    以下内容来自wiki:

    Basic commands working in Nmap

    • For target specifications :检测详细信息

    nmap <target’s URL’s or IP’s with spaces between them(can also use CIDR notation)>
    e.g. : scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0–255.1–254 (The command is nmap scanme.nmap.org and similar)

    • For OS detection :检测系统版本
    nmap -O <target-host's URL or IP>
    • For Version detection:检测应用程序版本
    nmap -sV <target-host's URL or IP>
    • For configuring response timings(-T0 to -T5 :increasing in aggressiveness):   #检测反应时间
    nmap -T0 -sV -O <target-host's URL or IP>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *