
レッドチームやバグハンター向けのツールスイート。IPレンジのスキャンとSSL証明書の検査により、隠れた開発環境やITインフラを発見し、一時的なクラウドアセットを特定します。
証明書から資産を見つけ出せ!ウェブをスキャンせよ! DEFCON 31 で発表されたツール
** CloudRecon を実行するには CGO を有効にし、gcc のインストールが必要になる場合があります**
sudo apt install gcc
go install github.com/g0ldencybersec/CloudRecon@latest
注:
インストール前に GOPATH を設定することを忘れないでください。
CloudRecon
CloudRecon は、レッドチームやバグハンターがキャンペーンやハントの中で、一時的な資産や開発資産を見つけるためのツールスイートです。
多くの場合、対象組織は、自社の ASN や既知のインフラに関連付けられていないクラウドインフラを立ち上げます。これらの資産は、開発サイトや IT 製品ポータルなどであることがよくあります。場合によってはドメインすら持たないこともありますが、それでも HTTPS が必要なものは多くあります。
CloudRecon は、IP アドレスや CIDR(例:クラウドプロバイダーの IP)をスキャンし、SSL 証明書を検査することで、テスター向けのこれらの隠れた宝を見つけるためのツールスイートです。
ツールスイートは GO で書かれた 3 つのパートから構成されています:
Scrape - SSL 証明書の CN および SN フィールド内のキーワードをリアルタイムで検査するためのライブ実行ツール。
Store - IP 証明書を取得し、それらの Org、CN、SAN をすべてダウンロードするためのツール。これにより、独自の cert.sh データベースを持つことができます。
Retr - ダウンロードした証明書を解析し、キーワードで検索するためのツール。
## Don't forget to run in TMUX / Screen session
wget https://raw.githubusercontent.com/lord-alfred/ipranges/main/all/ipv4_merged.txt
CloudRecon scrape -i ipv4_merged.txt -j | tee -a certdb.json
入力対応: IP アドレスや CIDR をカンマ区切りで指定するか、各行に IP/CIDR を記述したファイル、または ip:port 形式のリストを含むファイル。
メイン
Usage: CloudRecon scrape|store|retr [options]
-h Show the program usage message
Subcommands:
cloudrecon scrape - Scrape given IPs and output CNs & SANs to stdout
cloudrecon store - Scrape and collect Orgs,CNs,SANs in local db file
cloudrecon retr - Query local DB file for results
SCRAPE
scrape [options] -i <IPs/CIDRs or File>
-a Add this flag if you want to see all output including failures
-c int
How many goroutines running concurrently (default 100)
-h print usage!
-i string
Either IPs & CIDRs separated by commas, or a file with IPs/CIDRs on each line (default "NONE")
-j Generate JSON output ("IP, PORT, Organization, CommonName, SAN")
-p string
TLS ports to check for certificates (default "443")
-t int
Timeout for TLS handshake (default 4)
STORE
store [options] -i <IPs/CIDRs or File>
-c int
How many goroutines running concurrently (default 100)
-db string
String of the DB you want to connect to and save certs! (default "certificates.db")
-h print usage!
-i string
Either IPs & CIDRs separated by commas, or a file with IPs/CIDRs on each line, or file contains ip:port format list. (default "NONE")
-p string
TLS ports to check for certificates (default "443")
-t int
Timeout for TLS handshake (default 4)
RETR
retr [options]
-all
Return all the rows in the DB
-cn string
String to search for in common name column, returns like-results (default "NONE")
-db string
String of the DB you want to connect to and save certs! (default "certificates.db")
-h print usage!
-ip string
String to search for in IP column, returns like-results (default "NONE")
-num
Return the Number of rows (results) in the DB (By IP)
-org string
String to search for in Organization column, returns like-results (default "NONE")
-san string
String to search for in common name column, returns like-results (default "NONE")