Kail Linux渗透测试教程之Recon-NG框架
Kail Linux渗透测试教程之Recon-NG框架
信息收集
信息收集是网络攻击最重要的阶段之一。要想进行渗透攻击,就需要收集目标的各类信息。收集到的信息越多,攻击成功的概率也就越大。本章将介绍信息收集的相关工具。
Recon-NG框架
Recon-NG是由python编写的一个开源的Web侦查(信息收集)框架。Recon-ng框架是一个强大的工具,使用它可以自动的收集信息和网络侦查。下面将介绍使用Recon-NG侦查工具。
启动Recon-NG框架,执行命令如下所示:
root@kali:~# recon-ng
_/_/_/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/
_/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/
_/ _/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/
+---------------------------------------------------------------------------+
| _ ___ _ __ |
| |_)| _ _|_ |_|.|| _ | _ |_ _ _ _ _ _|_o _ _ (_ _ _ _o_|_ |
| |_)|(_|(_|\ | ||||_\ _|_| || (_)| |||(_| | |(_)| | __)(/_(_|_|| | | \/ |
| / |
| Consulting | Research | Development | Training |
| http://www.blackhillsinfosec.com |
+---------------------------------------------------------------------------+
[recon-ng v4.1.4, Tim Tomes (@LaNMaSteR53)]
[56] Recon modules
[5] Reporting modules
[2] Exploitation modules
[2] Discovery modules
[1] Import modules
[recon-ng][default] >
以上输出信息显示了Recon-NG框架的基本信息。例如在Recon-NG框架下,包括56个侦查模块、5个报告模块、2个渗透攻击模块、2个发现模块和1个导入模块。看到[recon-ng][default] >提示符,表示成功登录Recon-NG框架。现在,就可以在[recon-ng][default] >提示符后面执行各种操作命令了。
首次使用Recon-NG框架之前,可以使用help命令查看所有可执行的命令。如下所示:
[recon-ng][default] > help
Commands (type [help|?] <topic>):
---------------------------------
add Adds records to the database
back Exits current prompt level
del Deletes records from the database
exit Exits current prompt level
help Displays this menu
keys Manages framework API keys
load Loads specified module
pdb Starts a Python Debugger session
query Queries the database
record Records commands to a resource file
reload Reloads all modules
resource Executes commands from a resource file
search Searches available modules
set Sets module options
shell Executes shell commands
show Shows various framework items
spool Spools output to a file
unset Unsets module options
use Loads specified module
workspaces Manages workspaces
以上输出信息显示了在Recon-NG框架中可运行的命令。该框架和Metasploit框架类似,同样也支持很多模块。此时,可以使用show modules命令查看所有有效的模块列表。执行命令如下所示:
[recon-ng][default] > show modules
Discovery
---------
discovery/info_disclosure/cache_snoop
discovery/info_disclosure/interesting_files
Exploitation
------------
exploitation/injection/command_injector
exploitation/injection/xpath_bruter
Import
------
import/csv_file
Recon
-----
recon/companies-contacts/facebook
recon/companies-contacts/jigsaw
recon/companies-contacts/jigsaw/point_usage
recon/companies-contacts/jigsaw/purchase_contact
recon/companies-contacts/jigsaw/search_contacts
recon/companies-contacts/linkedin_auth
recon/contacts-contacts/mangle
recon/contacts-contacts/namechk
recon/contacts-contacts/rapportive
recon/contacts-creds/haveibeenpwned
……
recon/hosts-hosts/bing_ip
recon/hosts-hosts/ip_neighbor
recon/hosts-hosts/ipinfodb
recon/hosts-hosts/resolve
recon/hosts-hosts/reverse_resolve
recon/locations-locations/geocode
recon/locations-locations/reverse_geocode
recon/locations-pushpins/flickr
recon/locations-pushpins/picasa
recon/locations-pushpins/shodan
recon/locations-pushpins/twitter
recon/locations-pushpins/youtube
recon/netblocks-hosts/reverse_resolve
recon/netblocks-hosts/shodan_net
recon/netblocks-ports/census_2012
Reporting
---------
reporting/csv
reporting/html
reporting/list
reporting/pushpin
reporting/xml
[recon-ng][default] >
从输出的信息中,可以看到显示了五部分。每部分包括的模块数,在启动Recon-NG框架后可以看到。用户可以使用不同的模块,进行各种的信息收集。
【实例3-1】使用recon/domains-hosts/baidu_site模块,枚举baidu网站的子域。具体操作步骤如下所示:
(1)使用recon/domains-hosts/baidu_site模块。执行命令如下所示:
[recon-ng][default] > use recon/domains-hosts/baidu_site
(2)查看该模块下可配置选项参数。执行命令如下所示:
[recon-ng][default][baidu_site] > show options
Name Current Value Req Description
-------------- ---------------------- --------- --------------------------------------------------------
SOURCE default yes source of input (see 'show info' for details)
[recon-ng][default][baidu_site] >
从输出的信息中,可以看到有一个选项需要配置。
(3)配置SOURCE选项参数。执行命令如下所示:
[recon-ng][default][baidu_site] > set SOURCE baidu.com
SOURCE => baidu.com
从输出的信息中,可以看到SOURCE选项参数已经设置为baidu.com。
(4)启动信息收集。执行命令如下所示:
[recon-ng][default][baidu_site] > run
---------
BAIDU.COM
---------
[*] URL: http://www.baidu.com/s?pn=0&wd=site%3Abaidu.com
[*] map.baidu.com
[*] 123.baidu.com
[*] jingyan.baidu.com
[*] top.baidu.com
[*] www.baidu.com
[*] hi.baidu.com
[*] video.baidu.com
[*] pan.baidu.com
[*] zhidao.baidu.com
[*] Sleeping to avoid lockout...
-------
SUMMARY
-------
[*] 9 total (2 new) items found.
从输出的信息中,可以看到找到9个子域。枚举到的所有数据将被连接到Recon-NG放置的数据库中。这时候,用户可以创建一个报告查看被连接的数据。
【实例3-2】查看获取的数据。具体操作步骤如下所示:
(1)选择reporting/csv模块,执行命令如下所示:
[recon-ng][default] > use reporting/csv
(2)创建报告。执行命令如下所示:
[recon-ng][default][csv] > run
[*] 9 records added to '/root/.recon-ng/workspaces/default/results.csv'.
从输出的信息可以看到,枚举到的9个记录已被添加到/root/.recon-ng/workspaces/default/results.csv文件中。打开该文件,如图3.1所示。
图3.1 results.csv文件
(3)从该界面可以看到,枚举到的所有子域。
用户也可以使用Dmitry命令,查询关于网站的信息。下面将介绍Dmitry命令的使用。
查看Dmitry命令的帮助信息。执行命令如下所示:
root@kali:~# dmitry -h
Deepmagic Information Gathering Tool
"There be some deep magic going on"
dmitry: invalid option -- 'h'
Usage: dmitry [-winsepfb] [-t 0-9] [-o %host.txt] host
-o Save output to %host.txt or to file specified by -o file
-i Perform a whois lookup on the IP address of a host
-w Perform a whois lookup on the domain name of a host
-n Retrieve Netcraft.com information on a host
-s Perform a search for possible subdomains
-e Perform a search for possible email addresses
-p Perform a TCP port scan on a host
* -f Perform a TCP port scan on a host showing output reporting filtered ports
* -b Read in the banner received from the scanned port
* -t 0-9 Set the TTL in seconds when scanning a TCP port ( Default 2 )
*Requires the -p flagged to be passed
以上信息显示了dmitry命令的语法格式和所有可用参数。下面使用dmitry命令的-s选项,查询合理的子域。执行命令如下所示:
root@kali:~# dmitry -s google.com
Deepmagic Information Gathering Tool
"There be some deep magic going on"
HostIP:173.194.127.71
HostName:google.com
Gathered Subdomain information for google.com
---------------------------------
Searching Google.com:80...
HostName:www.google.com
HostIP:173.194.127.51
Searching Altavista.com:80...
Found 1 possible subdomain(s) for host google.com, Searched 0 pages containing 0 results
All scans completed, exiting
从输出的信息中,可以看到搜索到一个子域。该子域名为www.google.com,IP地址为173.194.127.51。该命令默认是从google.com网站搜索,如果不能连接google.com网站的话,执行以上命令将会出现Unable to connect: Socket Connect Error错误信息。
本文选自:Kail Linux渗透测试实训手册大学霸内部资料,转载请注明出处,尊重技术尊重IT人!
Kail Linux渗透测试教程之Recon-NG框架相关推荐
- Kail Linux渗透测试教程之在Metasploit中扫描
Kail Linux渗透测试教程之在Metasploit中扫描 在Metasploit中扫描 在Metasploit中,附带了大量的内置扫描器.使用这些扫描器可以搜索并获得来自一台计算机或一个完整网络 ...
- Kail Linux渗透测试实训手册第3章信息收集
Kail Linux渗透测试实训手册第3章信息收集 信息收集是网络攻击最重要的阶段之一.要想进行渗透攻击,就需要收集目标的各类信息.收集到的信息越多,攻击成功的概率也就越大.本章将介绍信息收集的相关工 ...
- Kail Linux渗透测试教程之免杀Payload生成工具Veil
Kail Linux渗透测试教程之免杀Payload生成工具Veil 免杀Payload生成工具--Veil Kail Linux渗透测试教程之免杀Payload生成工具Veil,Veil是一款利用M ...
- Kail Linux渗透测试教程之网络扫描和嗅探工具Nmap
Kail Linux渗透测试教程之网络扫描和嗅探工具Nmap 网络扫描和嗅探工具--Nmap Nmap也就网络映射器(Network Mapper),是一个免费开放的网络扫描和嗅探工具.该工具可以扫描 ...
- kail linux dns欺骗,Kali Linux渗透测试-Ettercap DNS欺骗攻击-Go语言中文社区
Kali Linux渗透测试-Ettercap DNS欺骗攻击 DNS欺骗攻击基于中间人攻击.攻击者更改受害者从DNS服务器查询的域名解析结果,给受害者发送恶意网页或者钓鱼网页-浏览器依然显示正常的u ...
- 视频教程-Kali Linux渗透测试全程课与脚本语言编程系列课程-渗透测试
Kali Linux渗透测试全程课与脚本语言编程系列课程 本人有多年的服务器高级运维与开发经验,擅长计算机与服务器攻防及网络攻防技术!对网络安全领域有持续的关注和研究! 林晓炜 ¥899.00 立即订 ...
- KALI LINUX渗透测试学习笔记
KALI LINUX渗透测试学习笔记 (苑房弘主讲) 第1章 课程介绍 任务1:Kali Linux渗透测试介绍.exe 安全问题的根源: 分层思想 只求功能实现 最大的威胁是人 渗透测试: 尝试挫败 ...
- 视频教程-Kali Linux渗透测试基础入门到进阶实战全程课-渗透测试
Kali Linux渗透测试基础入门到进阶实战全程课 本人有多年的服务器高级运维与开发经验,擅长计算机与服务器攻防及网络攻防技术!对网络安全领域有持续的关注和研究! 林晓炜 ¥499.00 立即订阅 ...
- 渗透测试流程之Kali
渗透测试流程之Kali 渗透测试流程 Kali Kali Linux VM安装 使用镜像配置虚拟机 虚拟机上安装和运行Windows 渗透测试流程 Kali Kali Linux是基于Debian的L ...
最新文章
- ubuntu14.06 Lts开启ssh服务
- python3爬虫入门教程-总算懂得python3.4爬虫入门教程
- Win关闭开启软件时的弹窗
- php 生成密码字典,密码字典生成工具crunch的简单使用
- [转载]ext4的noatime
- Android官方开发文档Training系列课程中文版:与其它APP交互之允许其它APP启动你的Activity
- 只显示 前100个字 java 实现截取字符串!使用! c:if test=${fn:length(onebeans.info)100 }${ fn:substri...
- eclipse spring boot_Spring源码(一)-Spring整体架构和环境搭建
- c语言程序设计ns图怎么画,请各位大神帮个忙,画个NS流程图,,急!!!
- jsp编程:用Servlet实现用户登陆
- 各大浏览器的最小字体与默认字体
- 数字电路与系统(第三版)答案 戚金清 王兢
- python写出租车计费系统_关于使用Python——写出租车计费系统
- Android 水瓶动画,贝塞尔Loading
- 单件模式(Singleton Pattern
- 解决ValueError: too many values to unpack
- Java实现随机生成车牌号
- Neo4j 学习笔记 1:属性图
- Java基于局域网(LAN)的聊天室软件-内附源码
- 校园网免认证上网的方法
热门文章
- 在C#中操作XM II
- Spring 捕捉校验参数异常并统一处理
- MathWorks.MATLAB.NET.Arrays.MWArray”的类型初始值设定项引发异常 解决方法
- .Net MVC Redirect出现:服务器无法在已发送 HTTP 标头之后设置状态解决方案
- 记录一次异常 出现不支持的 SQL92 标记: 70
- 同步等待异步操作,为什么Wait()在这里冻结程序
- Swift:print()vs println()vs NSLog()
- 如何根据C编程语言标准初始化结构
- 架构师实践日 11.9 南京站报名 | 技术大牛带你剖析大数据平台内部演进中的挑战与实践...
- IE11下载文件时出现文件名乱码