服务的指纹识别
为了确保有一个成功的渗透测试,必须知道目标系统中服务的指纹信息, 服务指纹信息包括服务端口, 服务名和版本等. 在Kaili中我们使用Nmap和Amap工具识别指纹信息.
1. 使用Nmap工具识别服务指纹信息
root@cliu-kali:~# nmap -sV 10.11.62.21
Starting Nmap 7.40 ( https://nmap.org ) at 2019-11-15 16:57 CST
Nmap scan report for 10.11.62.21
Host is up (0.0025s 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)
4444/tcp open krb524?
MAC Address: 00:0C:29:04:A1:4B (VMware)
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 148.32 seconds
我的这台测试机上开了22端口(ssh),111端口(不知道是啥),4444端口(jmeter agent用)
2. Amap是一个服务枚举工具
root@cliu-kali:~# amap -bq 10.11.62.21 10-5000
amap v5.4 (www.thc.org/thc-amap) started at 2019-11-15 17:16:19 - APPLICATION MAPPING mode
Protocol on 10.11.62.21:22/tcp matches ssh - banner: SSH-2.0-OpenSSH_5.3\r\n
Protocol on 10.11.62.21:22/tcp matches ssh-openssh - banner: SSH-2.0-OpenSSH_5.3\r\n
Protocol on 10.11.62.21:111/tcp matches rpc - banner: rZoooooo@
Protocol on 10.11.62.21:111/tcp matches rpc-rpcbind-v4
amap v5.4 finished at 2019-11-15 17:16:31
其他信息收集手段
Kali还有一些手段实现信息收集,如Recon-NG, Netdiscover 和Shodan工具等
1. Recon-NG
先来看下help
[recon-ng][default] > help Commands (type [help|?] <topic>): --------------------------------- add Adds records to the database {REONG-NG下本身存在有数据库, 每次我们查询到的结果也都会保存到数据库中, 使用add向某一个数据库中插入数据} back Exits the current context {当我们进入RECON-NG时其提示符是:[recon-ng][default] > ; 有时当我进入到一个模块中时,即是进入到了下一层级, 便可以使用back来返回了!} delete Deletes records from the database {与add对应哈,能加必能减,能量守恒定律!} exit Exits the framework help Displays this menu keys Manages framework API keys {recon-ng支持很多网站的API接口,比如SHODAN,google,baidu, 通过调用API使用搜索引擎来完成我们的信息搜索!} load Loads specified module {加载新的模块} pdb Starts a Python Debugger session {调用python的debugger对模块进行调试} query Queries the database {查询数据库,后面可以跟标准的sql语句} record Records commands to a resource file {将所有命令保存为resource文件,再在框架命令提示符下使用-r参数执行} reload Reloads all modules resource Executes commands from a resource file search Searches available modules {快速搜索相关联的模块!} set Sets module options shell Executes shell commands {通过shell在框架下调用一些复杂的系统命令} show Shows various framework items {显示当前框架的各种信息} snapshots Manages workspace snapshots {为recon-ng创建快照,相当于系统还原点} spool Spools output to a file unset Unsets module options use Loads specified module {即是使用模块} workspaces Manages workspaces