-
Notifications
You must be signed in to change notification settings - Fork 0
DomainsByCerts
Note
This module utilizes multiple external data sources and APIs to query Certificate Transparency (CT) logs. It implements robust fallback mechanisms, HTTP retry logic, and timeouts. These settings (e.g., MaxRetriesCert, RetryBaseDelay, CrtshPGTimeout) are governed by your global configuration. For comprehensive instructions on adjusting these parameters, refer to the Network Configuration page.
The Domains by Certificates module leverages Certificate Transparency (CT) logs to discover subdomains, emails, and target lifespans associated with a given domain. By extracting Subject Alternative Names (SANs) from SSL/TLS certificates, it can uncover hidden or unlinked infrastructure that is not publicly routable or linked from anywhere else.
The module accepts Domains as input and routes requests to a sequential chain of cert fetchers, extracting the following intelligence:
-
Subdomains: Extracts all valid subdomains listed in the certificate's SAN fields. Automatically parses wildcard certificates (e.g.,
*.example.combecomesexample.comwith aWildcardtag). All discovered subdomain nodes are automatically tagged withSANandCT Log. -
Emails: Extracts email addresses embedded in certificates (often found in older certificates or specific enterprise PKI setups), validating and returning them as new Email nodes (also tagged with
SANandCT Log). -
Certificate Lifespan: Extracts the
notAftertimestamp to determine the maximum known validity of the target's certificates, returning this as a date property.
Certificate Transparency logs are append-only, meaning they contain both active and expired certificates. This module intelligently classifies historical data based on the certificate's notAfter timestamp:
-
Historical Tags: If a certificate associated with a subdomain/email is expired (its
notAfterdate is in the past relative to the time of execution), the resulting node is automatically tagged asHistorical, and anExpiredstatus property is attached. -
Noise Reduction: By default, to prevent cluttering the graph with outdated infrastructure, expired subdomains are aggregated into a single
Expired Certificatessummary property rather than generating individual nodes. If theDisableCertExpiredSubdomainsnetwork option is enabled (true), this aggregation behavior is overridden, and every historical subdomain is explicitly emitted into the system as an individual node.
To ensure high availability and bypass potential rate limits or service outages, the module implements a robust sequential fallback chain. If a source fails or returns no data, it gracefully falls back to the next available provider in the chain. All HTTP requests utilize randomized User-Agents and the retry delays outlined in your network settings.
Data Source: Certspotter API
Queries the commercial-grade Certspotter endpoint (api.certspotter.com) for highly accurate and fast issuance records. It expands the response to capture all associated DNS names.
- This source can be explicitly bypassed by setting
DisableCertspotter=truein your configuration.
Data Source: crt.sh
If the primary fails, the module connects directly to the crt.sh PostgreSQL database (postgres://guest@crt.sh:5432/certwatch). This direct database connection circumvents the often rate-limited or overloaded crt.sh web frontend, executing specialized text-search queries for rapid discovery.
- This source can be explicitly bypassed by setting
DisableCrtshPG=truein your configuration.
Data Source: crt.sh API
If the direct database connection fails (e.g., due to port blocking, connection limits, or database maintenance), the module gracefully falls back to standard HTTP JSON queries against the crt.sh web endpoint (https://crt.sh/?q=%25.domain&output=json).