Skip to content

certgrep Guide

certgrep is a Certificate Transparency (CT) log search tool built by Have I Been Squatted. Use it to discover newly-issued certificates, detect brand impersonation, and investigate suspicious domains.

  1. Visit certgrep.sh
  2. Select a search mode (Regex, Wildcard, Contains, Starts With, or Ends With)
  3. Enter your pattern and click Search

certgrep supports five search modes, each optimized for different use cases:

ModeDescriptionExampleUse Case
RegexFull regular expression matchingpaypal-.*Complex pattern matching
WildcardPrefix wildcard matching*.example.comSubdomain discovery
ContainsSubstring match anywherepaypalBroad brand monitoring
Starts WithPrefix matchsecure-Common phishing prefix detection
Ends WithSuffix match.bankTLD-specific searches

Regex mode provides the most flexibility. Here are common patterns:

# Match any domain starting with "paypal-"
paypal-.*
# Match common phishing suffixes
.*-login\.com
.*-secure\.com
.*-support\.com

Search results display a table with the following columns:

The matched domain name. If the domain is part of a registrable domain (e.g., login.example.com under example.com), the registrable domain appears below.

The number of times this domain has been observed in CT logs. Click the count to view the full timeline of certificate occurrences.

Timestamp of the most recent certificate observation for this domain.

Some results display a Pre-cert badge. This indicates the match comes from a precertificate only (no final X.509 certificate has been observed yet).

After the initial search, certificate details are loaded for each result:

  • Subject: The certificate’s Subject Distinguished Name (DN), parsed into fields like CN (Common Name), O (Organization), etc.
  • Issuer: The issuing Certificate Authority’s Distinguished Name
  • SANs: Subject Alternative Names—all domains covered by the certificate

Use the Filter button to narrow results by column value:

ColumnFilterable Fields
NameDomain name or registrable domain
SubjectAny DN field, or specific: CN, O, OU, C, ST, L
IssuerAny DN field, or specific: CN, O, OU, C, ST, L
SANsAny SAN entry

When filtering Subject or Issuer columns, you can target specific Distinguished Name fields:

  • CN – Common Name
  • O – Organization
  • OU – Organizational Unit
  • C – Country
  • ST – State/Province
  • L – Locality/City

Use the Pre-certs toggle in the filter panel to include or exclude pre-certificate-only matches. Disabling this can reduce noise when focusing on issued certificates.

Click the Occurrences count to open the detail dialog. This displays:

All certificate observations for the domain, sorted by most recent first. Each entry shows:

  • Timestamp: When the certificate was logged
  • Log ID: The CT log identifier
  • Latest badge: Marks the most recent observation

For each occurrence:

  • Subject & Issuer: Full Distinguished Names, parsed and formatted
  • Validity: Not Before and Not After dates
  • Identifiers: Serial number and SHA-256 fingerprint
  • SANs: All Subject Alternative Names (up to 20 displayed, with count for additional)

Use the Copy as dropdown to export occurrence data:

Human-readable text format:

Domain: login.example.com
Occurrences: 3
2024-12-20T10:30:00.000Z log_id=42 index=12345 kind=1
subject_dn: CN=login.example.com
issuer_dn: CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US
not_before: 2024-12-20T00:00:00.000Z
not_after: 2025-03-20T00:00:00.000Z
serial: 03:a1:b2:c3:...
san_dns: login.example.com, www.example.com

Export the full results table using the Export dropdown:

Includes: name, registrable domain, occurrences, last seen, subject, issuer, and SANs (semicolon-separated).

Full structured data including all certificate fields and metadata.

Click the Columns button to toggle which columns are displayed. This is useful for focusing on specific data points or reducing visual clutter on smaller screens.

Each result row includes an Analyze button (magnifying glass icon) that opens the domain in Have I Been Squatted for deeper investigation:

  • Typosquatting permutation analysis
  • WHOIS/RDAP registration data
  • Passive DNS history
  • Phishing classification
  • Use regex patterns like yourbrand-.* and .*-yourbrand.* to catch impersonation attempts
  • Monitor common phishing suffixes: -login, -secure, -support, -verify
  • Search for suspicious TLDs (.tk, .ml, .cf, .gq) combined with brand terms
  • Look for certificate bursts—many certs issued in a short window can indicate campaign preparation
  • Use wildcard searches to enumerate subdomains: *.target.com
  • Filter by Issuer to identify which CAs are being used
  • Disable pre-certificates if you only care about issued certs
  • Use Subject/Issuer filters to exclude known-good CAs like internal PKI