uncover 使用多个搜索引擎快速发现互联网上暴露的主机

uncover 使用多个搜索引擎快速发现互联网上暴露的主机

项目地址:

GitHub:
https://github.com/projectdiscovery/uncover

uncover简介

uncover 是一个使用知名搜索引擎的 API 快速发现 Internet 上暴露的主机的 go编写的程序它在构建时考虑了自动化,因此您可以使用当前的管道工具对其进行查询并利用结果。目前支持shodancensysfofa搜索引擎。

特征

  • 查询多个搜索引擎的简单方便的实用程序
  • 多种搜索引擎支持(ShodanCensysFofa
  • 自动密钥/凭证随机化
  • stdin / stdout支持输入和输出

安装说明

discover需要go1.17才能安装成功。运行以下命令以获取 repo –

go install -v github.com/projectdiscovery/uncover/cmd/uncover@latest

用法

uncover -h

这将显示该工具的帮助。以下是它支持的所有参数:

用法:
  ./uncover [flags]

参数:
输入: 
   -q, -query string[] 搜索查询或列表(文件或逗号分隔或标准输入)
   -e, -engine string[] 搜索引擎查询(shodan,fofa,censys ) (默认shodan) 

配置: 
   -pc, -provider 字符串提供者配置文件(默认"$HOME/.config/uncover/provider-config.yaml") 
   -config 字符串标志配置文件(默认"$HOME/.config/uncover /config.yaml") 
   -timeout 超时时间 (default 10) 

输出: 
   -o, -output string 输出文件,以写入发现的结果 
   -f, -field string 要在输出中显示的字段(ip,端口,主机) (默认ip:port) 
   -j, -json 以 JSONL(ines) 格式写入输出
   -l, -limit int 限制要返回的结果数量(默认为 100)
   -nc, -no-color 在输出中禁用颜色

调试:
   -silent 仅在输出中显示结果
   -version 显示项目的版本
   -v 显示详细输出

提供者配置

默认的提供者配置文件应该位于,$HOME/.config/uncover/provider-config.yaml并以如下内容为例。为了运行此工具,需要在此配置文件中添加 API 密钥/凭据或将其设置为环境变量。

shodan:
  - SHODAN_API_KEY1
  - SHODAN_API_KEY2
censys:
  - CENSYS_API_ID:CENSYS_API_SECRET
fofa:
  - FOFA_EMAIL:FOFA_KEY

当在配置文件中为同一个提供者指定多个密钥/凭证时,每次执行都将使用随机密钥。

或者,您也可以在 bash 配置文件中将 API 密钥设置为环境变量。

export SHODAN_API_KEY=xxx
export CENSYS_API_ID=xxx
export CENSYS_API_SECRET=xxx
export FOFA_EMAIL=xxx
export FOFA_KEY=xxx

可以通过在ShodanCensysFofa上注册来获得所需的密钥。

运行uncover

uncover支持多种查询方式,包括stdinqflag

echo 'ssl:"Uber Technologies, Inc."' | uncover 
                                        
  __  ______  _________ _   _____  _____
 / / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ /  __/ /    
\__,_/_/ /_/\___/\____/|___/\___/_/ v0.0.1    
                                        

		projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using uncover, you also agree to the terms of the APIs used.

107.180.12.116:993
107.180.26.155:443
104.244.99.31:443
161.28.20.79:443
104.21.8.108:443
198.71.233.203:443
104.17.237.13:443
162.255.165.171:443
12.237.119.61:443
192.169.250.211:443
104.16.251.50:443

使用每行包含多个搜索查询 的文件输入运行uncover 。

cat dorks.txt

ssl:"Uber Technologies, Inc."
title:"Grafana"
uncover -q dorks.txt
                                        
  __  ______  _________ _   _____  _____
 / / / / __ \/ ___/ __ \ | / / _ \/ ___/
/ /_/ / / / / /__/ /_/ / |/ /  __/ /    
\__,_/_/ /_/\___/\____/|___/\___/_/ v0.0.1    
                                        

    projectdiscovery.io

[WRN] Use with caution. You are responsible for your actions
[WRN] Developers assume no liability and are not responsible for any misuse or damage.
[WRN] By using uncover, you also agree to the terms of the APIs used.

107.180.12.116:993
107.180.26.155:443
104.244.99.31:443
161.28.20.79:443
104.21.8.108:443
198.71.233.203:443
2607:7c80:54:3::74:3001
104.198.55.35:80
46.101.82.244:3000
34.147.126.112:80
138.197.147.213:8086

uncover支持fieldflag 来指定要返回的字段,目前支持ipporthost

uncover -q jira -f host -silent

ec2-44-198-22-253.compute-1.amazonaws.com
ec2-18-246-31-139.us-west-2.compute.amazonaws.com
tasks.devrtb.com
leased-line-91-149-128-229.telecom.by
74.242.203.213.static.inetbone.net
ec2-52-211-7-108.eu-west-1.compute.amazonaws.com
ec2-54-187-161-180.us-west-2.compute.amazonaws.com
185-2-52-226.static.nucleus.be
ec2-34-241-80-255.eu-west-1.compute.amazonaws.com

uncover支持field标志,该参数也可用于自定义输出格式,例如在 的情况下 uncover -f https://ip:port/versionip:port将替换为保持定义格式的输出中的结果。

echo kubernetes | uncover -f https://ip:port/version -silent

https://35.222.229.38:443/version
https://52.11.181.228:443/version
https://35.239.255.1:443/version
https://34.71.48.11:443/version
https://130.211.54.173:443/version
https://54.184.250.232:443/version

uncover支持多个搜索引擎,默认使用shodanengineflag 可用于指定任何可用的搜索引擎。

echo jira | uncover -e shodan,censys -silent

176.31.249.189:5001
13.211.116.80:443
43.130.1.221:631
192.195.70.29:443
52.27.22.181:443
117.48.120.226:8889
106.52.115.145:49153
13.69.135.128:443
193.35.99.158:443
18.202.109.218:8089
101.36.105.97:21379
42.194.226.30:2626

uncover的输出可以进一步通过管道传输到工作流中接受标准输入作为输入的其他项目。

uncover -q example -f ip | naabu  #在找到的主机上运行naabu进行端口扫描。
uncover -q title:GitLab | httpx   #为 Web 服务器运行httpx以探测找到的结果。
uncover -q http.title:GitLab -silent | httpx -silent

https://15.185.150.109
https://139.162.137.16
https://164.68.115.243
https://135.125.215.186
https://163.172.59.119
http://15.236.10.197
https://129.206.117.248
uncover -q 'org:"Example Inc."' | httpx | nuclei #运行httpx/nuclei进行漏洞评估。
uncover 使用多个搜索引擎快速发现互联网上暴露的主机

备注:

  • 在运行或使用此项目之前,需要配置密钥/凭据。
  • queryflag 支持使用的底层 API 支持的所有过滤器。
  • query标志输入需要与使用的搜索引擎兼容。
  • 结果仅限于100默认值,可以使用limit参数增加。

uncover下载地址:

GitHub:

转载请注明出处及链接

Leave a Reply

您的电子邮箱地址不会被公开。 必填项已用*标注