Recon-ng

Recon-NG是由python编写的一个开源的Web侦查(信息收集)框架。Recon-ng框架是一个全特性的工具,使用它可以自动的收集信息和网络侦查。其命令格式与Metasploit!默认集成数据库,可把查询结果结构化存储在其中,有报告模块,把结果导出为报告。
 
1、启动Recon-NG框架
[recon-ng][default] >提示符表示启动成功
<span style="font-size:18px;">root@kali:~# recon-ng

    _/_/_/    _/_/_/_/    _/_/_/    _/_/_/    _/      _/            _/      _/    _/_/_/
_/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/
_/_/_/ _/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/_/_/
_/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/ _/ _/
_/ _/ _/_/_/_/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/_/_/ +---------------------------------------------------------------------------+
| _ ___ _ __ |
| |_)| _ _|_ |_|.|| _ | _ |_ _ _ _ _ _|_o _ _ (_ _ _ _o_|_ |
| |_)|(_|(_|\ | ||||_\ _|_| || (_)| |||(_| | |(_)| | __)(/_(_|_|| | | \/ |
| / |
| Consulting | Research | Development | Training |
| http://www.blackhillsinfosec.com |
+---------------------------------------------------------------------------+ [recon-ng v4.6.3, Tim Tomes (@LaNMaSteR53)] [71] Recon modules #71个侦查模块
[7] Reporting modules #7个报告模块
[2] Import modules #2个导入模块
[2] Exploitation modules #2个渗透攻击模块
[2] Discovery modules #2个发现模块
</span>

使用help命令查看所有可执行的命令或-h

<span style="font-size:18px;">[recon-ng][default] > help

Commands (type [help|?] <topic>):
---------------------------------
add Adds records to the database #将记录添加到数据库中
back Exits the current context #退出当前上下文
delete Deletes records from the database
exit Exits the framework
help Displays this menu
<strong>keys Manages framework API keys #管理框架API
load Loads specified module #加载指定模块</strong>
pdb Starts a Python Debugger session #启动python调试器
query Queries the database #查询数据库
record Records commands to a resource file #记录命令到源文件中
<strong>reload Reloads all modules #重新加载所有模块</strong>
resource Executes commands from a resource file #在框架下从源文件中执行命令
<strong>search Searches available modules #搜索可用模块</strong>
set Sets module options #设置模块参数
<strong>shell Executes shell commands #执行shell命令
show Shows various framework items #显示各种框架项目
snapshots Manages workspace snapshots #管理工作区快照
</strong>spool Spools output to a file #输出到一个文件上
unset Unsets module options #复原模块参数
<span style="color:#ff0000;">use Loads specified module #加载指定模块</span>
workspaces Manages workspaces #管理工作区
</span>
 
root@kali:~# recon-ng -h
usage: recon-ng [-h] [-v] [-w workspace] [-r filename] [--no-check]
[--no-analytics] recon-ng - Tim Tomes (@LaNMaSteR53) tjt1980[at]gmail.com optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-w workspace load/create a workspace #设置不同工作区
-r filename load commands from a resource file#把recon-ng框架下的命令存成文本文件,可自动执行里面的指令
--no-check disable version check #每次启动不去检查recon-ng版本检查
--no-analytics disable analytics reporting #每次启动不去检查工作报告
[recon-ng][sina.com] > show options

  Name        Current Value  Required  Description
---------- ------------- -------- -----------
DEBUG False yes enable debugging output
NAMESERVER 8.8.8.8 yes nameserver for DNS interrogation
PROXY no proxy server (address:port)
THREADS 10 yes number of threads (where applicable)
TIMEOUT 10 yes socket timeout (seconds)
<strong>USER-AGENT Recon-ng/v4 yes user-agent string #伪装USER-AFENT</strong>
VERBOSE True yes enable verbose output

注:可用抓包发现USER-AFENT

[recon-ng][sina.com] > show schema        #显示数据库中的数据结构

2、最常用命令use

[recon-ng][sina.com] > use

双击tab键       #显示模块,可用search 寻找模块

无Google API 使用recon/domains-hosts/google_site_web使用show options/info先看一下参数

[recon-ng][sina.com][google_site_web] > show
Shows various framework items Usage: show [companies|contacts|credentials|dashboard|domains|globals|hosts|info|inputs|leaks|locations|modules|netblocks|options|ports|profiles|pushpins|schema|source|vulnerabilities] [recon-ng][sina.com][google_site_web] > show options Name Current Value Required Description
------ ------------- -------- -----------
SOURCE default yes source of input (see 'show info' for details) [recon-ng][sina.com][google_site_web] > show info Name: Google Hostname Enumerator
Path: modules/recon/domains-hosts/google_site_web.py
Author: Tim Tomes (@LaNMaSteR53) Description:
Harvests hosts from Google.com by using the 'site' search operator. Updates the 'hosts' table with
the results. Options:
Name Current Value Required Description
------ ------------- -------- -----------
SOURCE default yes source of input (see 'show info' for details) Source Options:
default SELECT DISTINCT domain FROM domains WHERE domain IS NOT NULL ORDER BY domain
<string> string representing a single input
<path> path to a file containing a list of inputs
query <sql> database query returning one column of inputs [recon-ng][sina.com][google_site_web] > show s
schema source
[recon-ng][sina.com][google_site_web] > show schema

指定域

[recon-ng][sina.com][google_site_web] > set SOURCE <strong>sina.com</strong>
SOURCE => sina.com

运行:run      #搜索部分结果会短暂sleep,防止被搜索引擎屏蔽

没找到结果
query 使用数据库语句 select * from hosts
#Select * from hosts where host like ‘%baidu.com%’ order by ip_address
#select * from hosts where host like '%www%'
3、Brute force  #暴力破解模块,如果搜不出来
[recon-ng][sina.com][bing_domain_web] > search brut
[*] Searching for 'brut'... Exploitation
------------
exploitation/injection/xpath_bruter Recon
-----
recon/domains-domains/brute_suffix
recon/domains-hosts/brute_hosts [recon-ng][sina.com][bing_domain_web] > use recon/domains-hosts/brute_hosts
[recon-ng][sina.com][brute_hosts] > show options Name Current Value Required Description
-------- ------------- -------- -----------
SOURCE default yes source of input (see 'show info' for details)
WORDLIST /usr/share/recon-ng/data/hostnames.txt yes path to hostname wordlist [recon-ng][sina.com][brute_hosts] > set SOURCE sina.com
SOURCE => sina.com
[recon-ng][sina.com][brute_hosts] > run
<strong style="font-family: Arial, Helvetica, sans-serif; "></strong><pre name="code" class="plain" style="display: inline !important;">--------

4、解析IP地址(查询数据库)

</pre><pre name="code" class="plain">[recon-ng][sina.com][brute_hosts] > search res
[*] Searching for 'res'... Discovery
---------
discovery/info_disclosure/interesting_files Recon
-----
recon/hosts-hosts/resolve
recon/hosts-hosts/reverse_resolve
recon/netblocks-hosts/reverse_resolve [recon-ng][sina.com][brute_hosts] > use recon/hosts-hosts/resolve
[recon-ng][sina.com][resolve] > show options Name Current Value Required Description
------ ------------- -------- -----------
SOURCE default yes source of input (see 'show info' for details) [recon-ng][sina.com][resolve] > show info Name: Hostname Resolver
Path: modules/recon/hosts-hosts/resolve.py
Author: Tim Tomes (@LaNMaSteR53) Description:
Resolves the IP address for a host. Updates the 'hosts' table with the results. Options:
Name Current Value Required Description
------ ------------- -------- -----------
SOURCE default yes source of input (see 'show info' for details) Source Options:
default SELECT DISTINCT host FROM hosts WHERE host IS NOT NULL AND ip_address IS NULL
<string> string representing a single input
<path> path to a file containing a list of inputs
<span style="color:#ff0000;">query</span> <sql> database query returning one column of inputs Comments:
* Note: Nameserver must be in IP form.

#负载均衡,一个域名可能被解析为多个IP地址

[recon-ng][sina.com][resolve] > set SOURCE query select host from hosts where host like '%youku.com%'
 ### SQL语句,
SOURCE => query select host from hosts where host like '%youku.com%'
[recon-ng][sina.com][resolve] > run
 
 

5、导出为报告模块

[recon-ng][sina.com][resolve] > search report
[*] Searching for 'report'... Reporting
---------
reporting/csv
reporting/html
reporting/json
reporting/list
reporting/pushpin
reporting/xlsx
reporting/xml [recon-ng][sina.com][resolve] > use reporting/html
[recon-ng][sina.com][html] > show options Name Current Value Required Description
-------- ------------- -------- -----------
CREATOR yes creator name for the report footer
CUSTOMER yes customer name for the report header
FILENAME /root/.recon-ng/workspaces/default/results.html yes path and filename for report output
SANITIZE True yes mask sensitive data in the report [recon-ng][sina.com][html] >
[recon-ng][sina.com][html] > set CREATOR ZiXuan
CREATOR => ZiXuan
[recon-ng][sina.com][html] > set CUSTOMER youku.com
CUSTOMER => youku.com
[recon-ng][sina.com][html] > set FILENAME /root/sina.html
FILENAME => /root/sina.html
[recon-ng][sina.com][html] > run
[*] Report generated at '/root/sina.html'.
 

小白日记,未完待续……

小白日记6:kali渗透测试之被动信息收集(五)-Recon-ng的更多相关文章

  1. 小白日记2:kali渗透测试之被动信息收集(一)

    一.被动信息收集 被动信息收集指的是通过公开渠道可获得的信息,与目标系统不产生直接交互,尽量避免留下一切痕迹的信息探测.被动探测技术收集的信息可以大致分为两类, 即配置信息和状态信息. 被动探测可收集 ...

  2. 小白日记3:kali渗透测试之被动信息收集(二)-dig、whios、dnsenum、fierce

    一.DIG linux下查询域名解析有两种选择,nslookup或者dig.Dig(Domain Information Groper)是一个在类Unix命令行模式下查询DNS包括NS记录,A记录,M ...

  3. 小白日记5:kali渗透测试之被动信息收集(四)--theHarvester,metagoofil,meltag,个人专属密码字典--CUPP

    1.theHarvester theHarvester是一个社会工程学工具,它通过搜索引擎.PGP服务器以及SHODAN数据库收集用户的email,子域名,主机,雇员名,开放端口和banner信息. ...

  4. 小白日记4:kali渗透测试之被动信息收集(三)--Shodan、Google

    搜索引擎 公司新闻动态 重要雇员信息 机密⽂文档 / 网络拓扑 用户名密码 目标系统软硬件技术架构一.Shodan Shodan只搜网络设备.很多设备并不应该接入互联网,却由于本地网络管理员的疏忽和懒 ...

  5. 小白日记7:kali渗透测试之主动信息收集-发现(一)--二层发现:arping/shell脚本,Netdiscover,scapy

    主动信息收集 被动信息收集可能不准确,可以用主动信息收集验证   特点:直接与目标系统交互通信,无法避免留下访问痕迹 解决方法:1.使用受控的第三方电脑进行探测,使用代理 (做好被封杀的准备)   2 ...

  6. 小白日记8:kali渗透测试之主动信息收集(二)三层发现:ping、traceroute、scapy、nmap、fping、Hping

    三层发现 三层协议有:IP以及ICMP协议(internet管理协议).icmp的作用是用来实现intenet管理的,进行路径的发现,网路通信情况,或者目标主机的状态:在三层发现中主要使用icmp协议 ...

  7. 小白日记9:kali渗透测试之主动信息收集(二)四层发现:TCP、UDP、nmap、hping、scapy

    四层发现 四层发现的目的是扫描出可能存活的IP地址,四层发现虽然涉及端口扫描,但是并不对端口的状态进行精确判断,其本质是利用四层协议的一些通信来识别主机ip是否存在. 四层发现的优点: 1.可路由且结 ...

  8. kali linux之被动信息收集(dns信息收集,区域传输,字典爆破)

    公开可获取的信息,不与目标系统产生交互,避免留下痕迹 下图来自美军方 pdf链接:http://www.fas.org/irp/doddir/army/atp2-22-9.pdf 信息收集内容(可利用 ...

  9. 小白日记25:kali渗透测试之提权(五)--利用配置不当提权

    利用配置不当提权 与漏洞提权相比,更常见的方法.在大部分企业环境下,会有相应的补丁更新策略,因此难以通过相应漏洞进行入侵.当入侵一台服务器后,无法照当相应的补丁进行提权,可通过寻找是否存在配置不当进行 ...

随机推荐

  1. 去除下载电影和电视剧文件名中的多余字符[python实现]

    讨厌下载电影和电视剧文件名中的多余字符(如网址和广告字样),,搞得文件名好长,可以使用下面的Python代码,自行修改即可. #!\usr\bin\env python # -*- coding: u ...

  2. 线性模型(3):Logistic Regression

    此笔记源于台湾大学林轩田老师<机器学习基石><机器学习技法> (一)Logistic Regression 原理 对于分类问题,假设我们想得到的结果不是(x属于某一类)这种形式 ...

  3. 连分数(分数类模板) uva6875

    //连分数(分数类模板) uva6875 // 题意:告诉你连分数的定义.求连分数,并逆向表示出来 // 思路:直接上分数类模板.要注意ai可以小于0 #include <iostream> ...

  4. The First Pig Task

                         The First Pig Program 环境: Hadoop-1.1.2 pig-0.11.1 linux系统为CentOS6.4 jdk1.6 在伪分布 ...

  5. MYSQL event_scheduler

    一.概述  事件调度器是在 MySQL 5.1 中新增的另一个特色功能,可以作为定时任务调度器,取代部分原先只能用操作系统任务调度器才能完成的定时功>能.例如,Linux 中的 crontabe ...

  6. 问题-FireDAC连接Sqlite3提示“unable to open database file”

    相关资料:http://www.dfwlt.com/forum.php?mod=viewthread&tid=1497&extra= 问题现象:FireDAC连接Sqlite3在开发电 ...

  7. jq简单选项卡

    function tabControl(obj,elm){ $(obj).hover(function(){ $(this).addClass('active').siblings().removeC ...

  8. C++ Lambda表达式用法

    C++ 11中的Lambda表达式用于定义并创建匿名的函数对象,以简化编程工作. Lambda的语法形式如下: [函数对象参数] (操作符重载函数参数) mutable或exception声明 -&g ...

  9. 在SQL Server 2014下面使用的SQL2000的Northwind和Pubs示例数据库

    在SQL Server 2014下面使用的SQL2000的Northwind和Pubs示例数据库 http://files.cnblogs.com/files/lxzhangying/SQl2000S ...

  10. java对cookie的操作_01

    /** * 读取所有cookie * 注意二.从客户端读取Cookie时,包括maxAge在内的其他属性都是不可读的,也不会被提交.浏览器提交Cookie时只会提交name与value属性.maxAg ...