在文章讲解以前先公布一个消息: mysql
全部参与活动获赠新书的童鞋,昨天书籍已经发出..只剩一本关于docker的,一直没有人认领,已经转为下期活动的奖品.再次呼吁你们,中奖后要当即联系我领奖,不要错过.linux
本次活动没有获赠书籍的童鞋也不要气馁,近期的赠书活动即将开始.sql
接下来是关于nmap***测试--版本探测正文: docker
若是到如今你还认为nmap只是一款端口扫描工具,甚至会以为,既然是端口扫描,我为何要用nmap呢,那就真是图样图森破了.nmap不仅仅能够扫描端口,能够检测识别出版本,除了Linux以外,还支持Windows.数据库
1.通常状况下 咱们使用 -sV 来启用版本探测,模拟以下: 服务器
[root@xinsz08 ~]# nmap -sV 192.168.1.100微信
Starting Nmap 7.60 ( https://nmap.org ) at 2017-10-12 09:48 CSTssh
Nmap scan report for 192.168.1.100tcp
Host is up (0.0000030s latency).ide
Not shown: 997 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 5.3 (protocol 2.0)
111/tcp open rpcbind 2-4 (RPC #100000)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 6.39 seconds
2.咱们还能够借助-A参数进行操做系统探测和版本探测,
[root@xinsz08 ~]# nmap -sV -A 192.168.1.100
Starting Nmap 7.60 ( https://nmap.org ) at 2017-10-12 09:57 CST
Nmap scan report for 192.168.1.100
Host is up (0.000045s latency).
Not shown: 997 closed ports
PORT STATE SERVICE VERSION
22/tcp open ssh OpenSSH 5.3 (protocol 2.0)
111/tcp open rpcbind 2-4 (RPC #100000)
| rpcinfo:
| program version port/proto service
| 100000 2,3,4 111/tcp rpcbind
| 100000 2,3,4 111/udp rpcbind
| 100024 1 41510/tcp status
|_ 100024 1 44842/udp status
3306/tcp open mysql MySQL (unauthorized)
Device type: general purpose
Running: Linux 2.6.X
OS CPE: cpe:/o:linux:linux_kernel:2.6.32
OS details: Linux 2.6.32
Network Distance: 0 hops
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 9.05 seconds
这里须要注意的是:
对于-sV或者-A参数所探测的选项不要彻底相信,由于有些软件会作假装.
如何解决这个问题呢? 这个时候须要用到另一个词叫扫描强度
参数 --version-intensity 参数后面能够直接加级别
级别的范围为 0--9 ,0表明强度最低, 9表明最高强度,默认为7,级别越高,服务越有可能被识别.
[root@xinsz08 ~]# nmap -sV --version-intensity 9 192.168.1.100
一样级别越高,就意味着消耗时间越长,固然时间长是相对而言的,不至于长到容忍不了的程度.
3.启用操做系统的探测
咱们先来探测Windows主机:ip为 192.168.1.102
咱们使用参数-O (这里是大写字母O,而不是数字0)
一样的若是是Linux服务器,咱们只须要改为Linux服务器的ip就能够了,参数一样是-O
总结: 以上是关于使用nmap对系统版本和服务版本的探测,主要使用的参数有:
-sV
-sV -A
-O
接下来你们能够在本身的虚拟机上进行测试了.
前几篇关于nmap文章都是基础用途,接下来咱们开始进行***测试了
下次文章预告:
数据库***测试
本文同步发布到今日头条,csdn ,欢迎你们转载.更多内容请关注微信公众号:xinsz08