TLS certificates · 02 Technique

TLS certificates: technique

The technique for exploiting certificates: reading the certificate, alternative names, issuer and dates, searching transparency logs, searching by organisation, searching by fingerprint in device search engines, historical certificates, self-signed certificates.

  1. 01
    Read the certificate

    From the browser padlock or the command line: names, issuer, dates, organisation.

  2. 02
    Exploit the alternative names

    Every name on the list is a domain or subdomain tied to the same certificate.

  3. 03
    Search the logs

    All certificates issued for a domain and its subdomains, including expired ones.

  4. 04
    Search by organisation

    In OV and EV certificates the organisation’s name leads to other domains of the same holder.

  5. 05
    Search by fingerprint

    In device search engines, the certificate’s fingerprint reveals other servers presenting it, sometimes the real one behind a CDN.

  6. 06
    Read the dates

    A certificate issued a few days before a phishing campaign shows when it was prepared.

  7. 07
    Look at self-signed certificates

    On servers and devices they may reveal internal names and models.

terminale
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -ext subjectAltName
curl -s "https://crt.sh/?q=example.com&output=json"

Alternative names and fingerprints are excellent pivots, because they link resources the holder did not think of exposing together.

Continue with
03 Sources

TLS certificates: sources

The sources for certificate research: the site’s certificate, Certificate Transparency logs, certificate and device search engines, historical archives, monitoring services.

↑