The internet relies on SSL/TLS certificates to create secure connections between your browser and websites by encrypting the data exchanged. These certificates help verify a website's identity, ensuring that you’re communicating with the real site. However, sometimes attackers can take advantage of fake or incorrect certificates to trick users into thinking they are visiting a trustworthy site.

To prevent this, Certificate Transparency (CT) logs are used. These logs keep track of all issued certificates, making it easier to spot any suspicious or unauthorized certificates before they can be misused.

What are Certificate Transparency Logs?

Certificate Transparency (CT) logs are public, append-only ledgers that record the issuance of SSL/TLS certificates. Whenever a Certificate Authority (CA) issues a new certificate, it must submit it to multiple CT logs. Independent organisations maintain these logs and are open for anyone to inspect.

Searching CT Logs

There are two popular options for searching CT logs:

Tool Key Features Use Cases Pros Cons
crt.sh User-friendly web interface, simple search by domain, displays certificate details, SAN entries. Quick and easy searches, identifying subdomains, checking certificate issuance history. Free, easy to use, no registration required. Limited filtering and analysis options.
Censys Powerful search engine for internet-connected devices, advanced filtering by domain, IP, certificate attributes. In-depth analysis of certificates, identifying misconfigurations, finding related certificates and hosts. Extensive data and filtering options, API access. Requires registration (free tier available).

crt.sh lookup

While crt.sh offers a convenient web interface, you can also leverage its API for automated searches directly from your terminal. Let's see how to find all 'dev' subdomains on facebook.com using curl and jq:

curl -s "<https://crt.sh/?q=facebook.com&output=json>" | jq -r '.[]
 | select(.name_value | contains("dev")) | .name_value' | sort -u