Sudomy是一個使用bash腳本創建的子域枚舉工具,用於快速全面地分析域和收集子域。

特性

輕便,快速,功能強大。幾乎所有的Linux發行版中都默認提供了Bash腳本。通過使用bash腳本的多進程處理功能,可以最佳地利用所有處理器。

子域枚舉過程可以通過使用主動或被動方法來實現

(1)主動方法

Sudomy利用Gobuster工具,因爲它在執行DNS Subdomain Bruteforce攻擊(支持通配符)時具有高速性能。使用的詞彙表來自組合的SecList(Discover/DNS)列表,其中包含大約300萬個條目

(2)被動方法

通過選擇第三方站點可以優化枚舉過程,節約大量時間並獲得更多的結果。Sudomy可以從這16個第三方網站收集數據:

https://dnsdumpster.com

https://web.archive.org


https://shodan.io


https://virustotal.com


https://crt.sh


https://www.binaryedge.io


https://securitytrails.com


https://sslmate.com/certspotter


https://censys.io


https://threatminer.org


http://dns.bufferover.run


https://hackertarget.com


https://www.entrust.com/ct-search/


https://www.threatcrowd.org


https://riddler.io

https://findsubdomains.com

測試收集的子域列表並探測工作的http或https服務器。此功能使用第三方工具 httprobe 來完成。

基於Ping Sweep和/或獲取的HTTP狀態碼測試子域可用性。

檢測虛擬主機的能力(解析爲單個IP地址的多個子域)。Sudomy會將收集的子域解析爲IP地址,然後在多個子域解析爲單個IP地址時對其進行分類。此功能對於下一次滲透測試/bug bounty非常有用。例如,在端口掃描中,不會重複的掃描單個IP地址

從收集的子域/虛擬主機IP地址執行端口掃描

子域名接管攻擊測試

子域截圖

以HTML或CSV格式輸出報告

Sudomy 是如何工作的?

Sudomy使用cURL庫以從第三方站點獲取HTTP響應主體,然後執行正則表達式獲取子域。此過程充分利用了多處理器,將節約大量時間並獲得更多的結果。

對比

以下是Sublist3r,Subfinder和Sudomy的被動枚舉DNS測試的結果的對比。使用的域爲bugcrowd.com。

Asciinema:

Subfinder

Sudomy

Sublist3r

安裝

目前,Sudomy包含了以下的擴展工具。有關應用的安裝和使用說明請點擊相應鏈接。

Tools License Info
Gobuster Apache License 2.0 非強制性
httprobe Tom Hudson – 強制性
nmap GNU General Public License v2.0 非強制性

依賴項

$ pip install -r requirements.txt

Sudomy需要 jq 來運行和解析。有關jq的下載和安裝 請參閱此處

# Linux
apt-get install jq nmap phantomjs
# Mac
brew cask install phantomjs
brew install jq nmap

如果你已準備好了Go環境,那麼鍵入以下命令:

export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
go get -u github.com/tomnomnom/httprobe
go get -u github.com/OJ/gobuster

從 Github 下載 Sudomy

# Clone this repository
git clone --recursive https://github.com/screetsec/Sudomy.git
# Go into the repository
sudomy --help

在 Docker 容器中運行

# Pull an image from DockerHub
docker pull screetsec/sudomy:v1.1.0
# 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" -it --rm screetsec/sudomy:v1.1.0 [argument]

安裝後

查詢第三方網站之前需要API密鑰,例如Shodan,Censys,SecurityTrails,Virustotal和BinaryEdge。

API密鑰設置可以在sudomy.api文件中完成。

# Shodan
# URL :  http://developer.shodan.io
# Example :
#      - SHODAN_API="VGhpc1M0bXBsZWwKVGhmcGxlbAo"
SHODAN_API=""
# Censys
# URL : https://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=""

使用

___         _ _  _
/ __|_  _ __| (_)(_)_ __ _  _
\__ \ || / _  / __ \  ' \ || |
|___/\_,_\__,_\____/_|_|_\_, |
                          |__/ v{1.1.0#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
         sud⍥my.sh -pS -rS -sC -nT -sS -d example.com
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,  --html		 Make report output into HTML
  -s,  --source		 Use source for Enumerate Subdomain
  -tO, --takeover	 Subdomain TakeOver Vulnerabilty Scanner
  -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
  -nP, --no-passive	 Do not perform passive subdomain enumeration
       --no-probe	 Do not perform httprobe

將所有16個源和探針用於工作的http或https服務器:

$ sudomy -d hackerone.com

使用其中一個源:

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

使用一個或多個插件:

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

使用所有插件:測試主機狀態,http/https狀態碼,子域名接管和屏幕截圖

$ sudomy --all -d hackerone.com

以HTML格式創建報告

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

HTML報告示例:

儀表板

報告

相關文章