Information Gatheringsslcertificatescertificate-transparencydomain-enumerationgraph

CertGraph

CertGraph crawls SSL certificates to build a directed graph of certificate Alternate Names for domain enumeration. It reveals chains of trust between domains sharing certificates.

Description

CertGraph is a tool designed for host name enumeration via SSL certificates. It crawls certificates to create a directed graph where domains are nodes and alternative names in certificates form edges to other domains. New domains are printed as discovered, and in detailed mode, the graph's adjacency list is output upon completion.

The tool supports multiple drivers, defaulting to TCP connections for certificate collection, but can search Certificate Transparency logs. It helps uncover relationships between domains through shared certificates, showing chains of trust.

Use cases include reconnaissance for bug bounties, security assessments, and mapping certificate reuse across domains.

How It Works

CertGraph performs a breadth-first search (BFS) starting from given hosts, with a default maximum depth of 5. It connects over TCP by default to fetch certificates or uses Certificate Transparency log drivers. Domains from Subject Alternative Names (SANs) become graph edges. Expired certificates and subdomains can be included via specific flags, with CDN certificates optionally added.

Installation

bash
sudo apt install certgraph

Flags

-cdninclude certificates from CDNs
-ct-expiredinclude expired certificates in certificate transparency search
-ct-subdomainsinclude sub-domains in certificate transparency search
-depth uintmaximum BFS depth to go (default 5)

Examples

Display help and usage information for certgraph
certgraph -h
Crawl certificate graph starting from example.com using default TCP driver and depth 5
certgraph example.com
Crawl with maximum BFS depth limited to 3
certgraph -depth 3 example.com
Include subdomains from Certificate Transparency logs
certgraph -ct-subdomains example.com
Search Certificate Transparency logs including expired certificates and subdomains
certgraph -ct-expired -ct-subdomains example.com
Include certificates from CDNs in the crawl
certgraph -cdn example.com
Crawl multiple starting hosts with CDN support and increased depth
certgraph -cdn -depth 10 target.com sub.target.com
Updated 2026-04-16kali.org ↗