Sudomy是一个子域枚举工具,用于收集子域和分析域

作者:Sec-Labs | 发布时间:

工具介绍

Sudomy是一个子域枚举工具,用于收集子域和分析域,执行自动侦查(recon),以进行bug赏金/渗透测试。、

关键词:子域列举和分析f0204ab87b153002

Sudomy是一个子域枚举工具,用于收集子域和分析域执行高级自动侦察(框架)。这个工具也可用于OSINT(开放源码情报)活动。

工具地址

https://github.com/screetsec/Sudomy

特点

最近,Sudomy有以下20个特点。

简单、轻便、快速、强大。Bash脚本(控制器)在几乎所有的Linux发行版中都是默认可用的。通过使用bash脚本的多进程功能,所有的处理器都能得到最佳利用。
子域枚举过程可以通过使用主动方法或被动方法实现

主动方法

Sudomy利用Gobuster工具,因为它在进行DNS子域暴力攻击(支持通配符)时性能很高。所使用的词表来自SecList(发现/DNS)的组合列表,其中包含约300万个条目。

被动方法

通过评估和选择好的第三方网站/资源,列举过程可以被优化。以较少的时间获得更多的结果。Sudomy可以从这些精心策划的22个第三方网站收集数据。

https://censys.io
  https://developer.shodan.io
  https://dns.bufferover.run
  https://index.commoncrawl.org 
  https://riddler.io 
  https://api.certspotter.com
  https://api.hackertarget.com 
  https://api.threatminer.org
  https://community.riskiq.com
  https://crt.sh
  https://dnsdumpster.com
  https://docs.binaryedge.io
  https://securitytrails.com
  https://graph.facebook.com
  https://otx.alienvault.com
  https://rapiddns.io
  https://spyse.com
  https://urlscan.io
  https://www.dnsdb.info
  https://www.virustotal.com
  https://threatcrowd.org
  https://web.archive.org
  • 测试收集到的子域列表并探测工作中的http或https服务器。这个功能使用第三方工具,httprobe。
  • 基于Ping Sweep和/或通过获取HTTP状态代码来测试子域的可用性。
  • 能够检测虚拟主机(几个子域解析到一个IP地址)。Sudomy将把收集到的子域名解析为IP地址,如果几个
  • 子域名解析为一个IP地址,则对它们进行分类。这一功能对于接下来的渗透测试/漏洞赏金过程将非常有用。例如,在端口扫描中,单个IP地址不会被重复扫描
  • 从收集的子域/虚拟主机的IP地址进行端口扫描
  • 测试子域接管攻击(CNAME解析器、DNSLookup、检测NXDomain、检查漏洞)。
  • 使用gowitness对子域进行截图,或者你可以选择其他截图工具,比如(-ss webscreeenshot)。
  • 识别网站上的技术(类别、应用程序、版本)。
  • 检测url、端口、标题、内容长度、状态代码、响应内容的探测。
  • 智能的自动回退,从https到http作为默认。
  • 从第三方(默认::Shodan)收集数据/抓取开放端口,目前只使用Shodan [未来::Censys,Zoomeye]。从目标
  • IP列表中收集端口更有效[[ 子域 > IP解析器 > 抓取 > ASN & 开放端口]] 。
  • 收集有趣的URL和提取URL参数(资源默认::WebArchive, CommonCrawl, UrlScanIO)。
  • 收集有趣的路径(api|.git|admin|etc)、文档(doc|pdf)、javascript(js|node)和参数。
  • 定义输出文件的路径(完成后指定一个输出文件)
  • 检查一个IP是否为Cloudflare所拥有
  • 根据收集的URL资源(WAYBACK,URLSCAN,COMPANYCRAWL.COM)生成和制作单词表。为了做到这一点,我们从我们的域名中提取所有的参数和路径。
  • 生成网络图的可视化子域和虚拟主机
  • 以HTML和CSV格式报告输出
  • 向slack频道发送通知

Sudomy是如何工作的

sudomy是如何工作的,或者说recon flow,当你运行最好的参数来收集子域并通过做自动侦察进行分析。

root@maland: ./sudomy -d bugcrowd.com -dP -eP -rS -cF -pS -tO -gW --httpx --dnsprobe  -aI webanalyze -sS

侦察工作流程

这个侦察工作流程 Sudomy v1.1.8#dev

a2559fe1b3153230

详细资料

详细信息 文件识别和丰富数据

------------------------------------------------------------------------------------------------------

- subdomain.txt             -- Subdomain list             < $DOMAIN (Target)
- httprobe_subdomain.txt    -- Validate Subdomain	  < subdomain.txt
- webanalyzes.txt           -- Identify technology scan   < httprobe_subdomain.txt
- httpx_status_title.txt    -- title+statuscode+lenght    < httprobe_subdomain.txt
- dnsprobe_subdomain.txt    -- Subdomain resolv		  < subdomain.txt
- Subdomain_Resolver.txt    -- Subdomain resolv (alt)     < subdomain.txt
- cf-ipresolv.txt           -- Cloudflare scan        	  < ip_resolver.txt 
- Live_hosts_pingsweep.txt  -- Live Host check		  < ip_resolver.txt	 
- ip_resolver.txt           -- IP resolv list          	  < Subdomain_Resolver::dnsprobe
- ip_dbasn.txt		    -- ASN Number Check		  < ip_resolver.txt
- vHost_subdomain.txt       -- Virtual Host (Group by ip) < Subdomain_Resolver.txt
- nmap_top_ports.txt        -- Active port scanning       < cf-ipresolv.txt
- ip_dbport.txt		    -- Passive port scanning	  < cf-ipresolv.txt

------------------------------------------------------------------------------------------------------
- Passive_Collect_URL_Full.txt 		-- Full All Url Crawl (WebArchive, CommonCrawl, UrlScanIO)
------------------------------------------------------------------------------------------------------

- ./screenshots/report-0.html   	-- Screenshoting report    	< httprobe_subdomain.txt
- ./screenshots/gowitness/gowitness.sqlite3   		-- Database screenshot    	< httprobe_subdomain.txt

------------------------------------------------------------------------------------------------------

- ./interest/interesturi-allpath.out	-- Interest path(/api,/git,etc) < Passive_Collect_URL_Full.txt
- ./interest/interesturi-doc.out	-- Interest doc (doc,pdf,xls)   < Passive_Collect_URL_Full.txt
- ./interest/interesturi-otherfile.out	-- Other files (.json,.env,etc) < Passive_Collect_URL_Full.txt
- ./interest/interesturi-js.out		-- All Javascript files(*.js)  	< Passive_Collect_URL_Full.txt
- ./interest/interesturi-nodemodule.out	-- Files from /node_modules/    < Passive_Collect_URL_Full.txt
- ./interest/interesturi-param-full.out	-- Full parameter list 		< Passive_Collect_URL_Full.txt
- ./interest/interesturi-paramsuniq.out -- Full Uniq parameter list 	< Passive_Collect_URL_Full.txt

-  Notes : You can validate juicy/interest urls/param using urlprobe or httpx to avoid false positives
------------------------------------------------------------------------------------------------------

- ./takeover/CNAME-resolv.txt		-- CNAME Resolver 		< subdomain.txt
- ./takeover/TakeOver-Lookup.txt	-- DNSLookup 			< CNAME-resolv.txt
- ./takeover/TakeOver-nxdomain.txt	-- Other 3d service platform	< TakeOver-Lookup.txt
- ./takeover/TakeOver.txt		-- Checking Vulnerabilty	< CNAME-resolv.txt

------------------------------------------------------------------------------------------------------

- ./wordlist/wordlist-parameter.lst     -- Generate params wordlist     < Passive_Collect_URL_Full.txt
- ./wordlist/wordlist-pathurl.lst       -- Generate List paths wordlis  < Passive_Collect_URL_Full.txt

-  Notes : This Wordlist based on domain & subdomain information (path,file,query strings & parameter)
------------------------------------------------------------------------------------------------------

出版

Sudomy: 用于子域列举和分析的信息收集工具 - IOP Conference Series: 材料科学与工程,第771卷,第二届工程与应用科学国际会议(第二届InCEAS)2019年11月16日,印度尼西亚日惹市

用户指南

离线用户指南:Sudomy - 子域列举和分析用户指南 v1.0
在线用户指南:子域列举和分析用户指南 - 最新版本

比较

Sudomy在使用资源(第三方网站)时,尽量减少更多的资源。通过评估和选择好的第三方网站/资源,这样可以优化列举过程。本次比较中使用的域名是tiket.com。

以下是Sublist3r v1.1.0、Subfinder v2.4.5和Sudomy v1.2.0的被动枚举DNS测试的结果。

a68f21e908153441

在这里,subfinder仍然被归类为利用相当多的资源来收集子域的非常快。特别是如果使用的资源已经被优化(?)

对于编译结果和视频,你可以在这里查看。

当我有空闲时间时。也许在未来,sudomy也会使用golang。如果你想做出贡献,它对pull是开放的。

 

安装

Sudomy目前已经扩展了以下工具。以下是关于如何安装和使用该应用程序的说明。


从Github下载Sudomy

# Clone this repository
git clone --recursive https://github.com/screetsec/Sudomy.git

 

依赖

$ python3 -m pip install -r requirements.txt

Sudomy需要jqGNU grep来运行和解析。关于如何下载和安装jq的信息可以在这里获得。

# Linux
apt-get update
apt-get install jq nmap phantomjs npm chromium parallel
npm i -g wappalyzer wscat

# Mac
brew cask install phantomjs 
brew install jq nmap npm parallel grep
npm i -g wappalyzer wscat


# Note
All you would need is an installation of the latest Google Chrome or Chromium 
Set the PATH in rc file for GNU grep changes

在Docker容器中运行

# Pull an image from DockerHub
docker pull screetsec/sudomy:v1.2.1-dev

# Create output directory
mkdir output

# Run an image, you can run the image on custom directory but you must copy/download config sudomy.api on current directory
docker run -v "${PWD}/output:/usr/lib/sudomy/output" -v "${PWD}/sudomy.api:/usr/lib/sudomy/sudomy.api" -t --rm screetsec/sudomy:v1.1.9-dev [argument]

# or define API variable when executed an image.

docker run -v "${PWD}/output:/usr/lib/sudomy/output" -e "SHODAN_API=xxxx" -e "VIRUSTOTAL=xxxx" -t --rm screetsec/sudomy:v1.1.9-dev [argument]

安装后

在查询第三方网站,如Shodan、Censys、SecurityTrails、Virustotal和BinaryEdge之前,需要API密钥

API密钥的设置可以在sudomy.api文件中完成。

# Shodan
# URL :  http://developer.shodan.io
# Example :
#      - SHODAN_API="VGhpc1M0bXBsZWwKVGhmcGxlbAo"

SHODAN_API=""

# Censys
# URL : https://search.censys.io/register

CENSYS_API=""
CENSYS_SECRET=""

# Virustotal
# URL : https://www.virustotal.com/gui/
VIRUSTOTAL=""


# Binaryedge
# URL : https://app.binaryedge.io/login
BINARYEDGE=""


# SecurityTrails
# URL : https://securitytrails.com/
SECURITY_TRAILS=""

在使用slack通知之前,需要设置YOUR_WEBHOOK_URL。

URL的设置可以在slack.conf文件中完成。

# Configuration Slack Alert
# For configuration/tutorial to get webhook url following to this site
#     - https://api.slack.com/messaging/webhooks
# Example: 
#     - YOUR_WEBHOOK_URL="https://hooks.slack.com/services/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"

YOUR_WEBHOOK_URL="https://hooks.slack.com/services/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"

使用方法

___         _ _  _           
/ __|_  _ __| (_)(_)_ __ _  _ 
\__ \ || / _  / __ \  ' \ || |
|___/\_,_\__,_\____/_|_|_\_, |
                          |__/ v{1.2.1#dev} by @screetsec 
Sud⍥my - Fast Subdmain Enumeration and Analyzer      
         http://github.com/screetsec/sudomy

Usage: sud⍥my.sh [-h [--help]] [-s[--source]][-d[--domain=]] 

Example: sud⍥my.sh -d example.com   
         sud⍥my.sh -s Shodan,VirusTotal -d example.com

Best Argument:
  sudomy -d domain.com -dP -eP -rS -cF -pS -tO -gW --httpx --dnsprobe  -aI webanalyze --slack -sS


Optional Arguments:
  -a,  --all             Running all Enumeration, no nmap & gobuster 
  -b,  --bruteforce      Bruteforce Subdomain Using Gobuster (Wordlist: ALL Top SecList DNS) 
  -d,  --domain          domain of the website to scan
  -h,  --help            show this help message
  -o,  --outfile         specify an output file when completed 
  -s,  --source          Use source for Enumerate Subdomain
  -aI, --apps-identifier Identify technologies on website (ex: -aI webanalyze)
  -dP, --db-port         Collecting port from 3rd Party default=shodan
  -eP, --extract-params  Collecting URL Parameter from Engine
  -tO, --takeover        Subdomain TakeOver Vulnerabilty Scanner
  -wS, --websocket       WebSocket Connection Check
  -cF, --cloudfare       Check an IP is Owned by Cloudflare
  -pS, --ping-sweep      Check live host using methode Ping Sweep
  -rS, --resolver        Convert domain lists to resolved IP lists without duplicates
  -sC, --status-code     Get status codes, response from domain list
  -nT, --nmap-top        Port scanning with top-ports using nmap from domain list
  -sS, --screenshot      Screenshots a list of website (default: gowitness)
  -nP, --no-passive      Do not perform passive subdomain enumeration 
  -gW, --gwordlist       Generate wordlist based on collecting url resources (Passive) 
       --httpx           Perform httpx multiple probers using retryablehttp 
       --dnsprobe        Perform multiple dns queries (dnsprobe) 
       --no-probe        Do not perform httprobe 
       --html            Make report output into HTML 
       --graph           Network Graph Visualization

要使用所有22个来源和探测工作的http或https服务器(验证)。

$ sudomy -d hackerone.com

要使用一个或多个来源。

$ sudomy -s shodan,dnsdumpster,webarchive -d hackerone.com

要使用所有无需验证的来源。

$ sudomy -d hackerone.com --no-probe

要使用一个或多个插件。

$ sudomy -pS -sC -sS -d hackerone.com

要使用所有的插件:测试主机状态,http/https状态代码,子域接管和屏幕截图。

不包括Nmap,Gobuster,wappalyzer和wscat。

$ sudomy -d hackerone.com --all

创建HTML格式的报告

$ sudomy -d hackerone.com --html --all

HTML报告样本

Dashboard Reports
1b60e8f7aa154128

 

73749b7287154139

 

 

建立网络图的可视化子域和虚拟主机

$ sudomy -d hackerone.com -rS --graph

图形可视化样本

d243197c06154214

要使用最佳参数来收集子域,通过做自动侦察和发送通知到slack来进行分析

./sudomy -d ngesec.id -dP -eP -rS -cF -pS -tO -gW --httpx --dnsprobe --graph  -aI webanalyze --slack -sS

Slack通知样本

b3f781c151154243

 

标签:工具分享, 资产测绘