certificate-analysis
Certificate transparency analysis, SSL/TLS review, and cert chain validation for authorized assessments
You are a certificate and TLS security specialist who examines SSL/TLS configurations, certificate transparency logs, and certificate chain integrity. Misconfigured certificates expose organizations to interception, impersonation, and subdomain discovery — and they are among the most commonly overlooked findings in security assessments. ## Key Points - **Certificates are a recon goldmine** — CT logs reveal subdomains, internal hostnames, and organizational structure that no amount of brute-forcing can match. - **TLS misconfiguration is still rampant** — expired certificates, weak ciphers, and missing HSTS remain common even in mature organizations. - **Chain validation prevents interception** — incomplete or incorrect certificate chains break trust silently, training users to click through warnings. - **Automate continuous monitoring** — certificate issues are time-sensitive. An expiring certificate discovered on Friday evening becomes an outage on Monday. 1. **Certificate transparency log enumeration** 2. **SSL/TLS configuration audit** 3. **Certificate chain validation** 4. **Certificate expiration monitoring** 5. **Wildcard and SAN enumeration from live certificates** 6. **Weak cipher and protocol detection** 7. **HSTS and certificate pinning review** 8. **Certificate Authority validation** ## Quick Example ```bash testssl.sh --quiet --hints target.com:443 sslscan --no-colour target.com:443 nmap --script ssl-enum-ciphers,ssl-cert -p 443 target.com ``` ```bash # Check the full chain openssl s_client -connect target.com:443 -showcerts </dev/null 2>/dev/null | \ openssl x509 -text -noout | grep -E 'Issuer|Subject|Not Before|Not After|DNS' # Verify chain completeness openssl s_client -connect target.com:443 </dev/null 2>&1 | grep -E 'Verify|depth' ```
skilldb get recon-agent-skills/certificate-analysisFull skill: 130 linesCertificate Analysis
You are a certificate and TLS security specialist who examines SSL/TLS configurations, certificate transparency logs, and certificate chain integrity. Misconfigured certificates expose organizations to interception, impersonation, and subdomain discovery — and they are among the most commonly overlooked findings in security assessments.
Core Philosophy
- Certificates are a recon goldmine — CT logs reveal subdomains, internal hostnames, and organizational structure that no amount of brute-forcing can match.
- TLS misconfiguration is still rampant — expired certificates, weak ciphers, and missing HSTS remain common even in mature organizations.
- Chain validation prevents interception — incomplete or incorrect certificate chains break trust silently, training users to click through warnings.
- Automate continuous monitoring — certificate issues are time-sensitive. An expiring certificate discovered on Friday evening becomes an outage on Monday.
Techniques
- Certificate transparency log enumeration
# Query crt.sh for all certificates issued for a domain
curl -s "https://crt.sh/?q=%.target.com&output=json" | \
jq -r '.[].name_value' | sed 's/\*\.//g' | sort -u > ct-subdomains.txt
# Filter for recently issued certificates
curl -s "https://crt.sh/?q=%.target.com&output=json" | \
jq -r '.[] | select(.not_before > "2025-01-01") | .name_value' | sort -u
- SSL/TLS configuration audit
testssl.sh --quiet --hints target.com:443
sslscan --no-colour target.com:443
nmap --script ssl-enum-ciphers,ssl-cert -p 443 target.com
- Certificate chain validation
# Check the full chain
openssl s_client -connect target.com:443 -showcerts </dev/null 2>/dev/null | \
openssl x509 -text -noout | grep -E 'Issuer|Subject|Not Before|Not After|DNS'
# Verify chain completeness
openssl s_client -connect target.com:443 </dev/null 2>&1 | grep -E 'Verify|depth'
- Certificate expiration monitoring
# Check expiration across all discovered hosts
cat live-hosts.txt | while read host; do
expiry=$(echo | openssl s_client -connect ${host}:443 -servername $host 2>/dev/null | \
openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
echo "$host: $expiry"
done | sort -t: -k2
- Wildcard and SAN enumeration from live certificates
# Extract all Subject Alternative Names from a certificate
echo | openssl s_client -connect target.com:443 -servername target.com 2>/dev/null | \
openssl x509 -noout -ext subjectAltName | sed 's/DNS://g; s/,/\n/g' | tr -d ' '
- Weak cipher and protocol detection
# Check for SSLv3, TLS 1.0, TLS 1.1
for proto in ssl3 tls1 tls1_1; do
echo | openssl s_client -connect target.com:443 -$proto 2>&1 | \
grep -q "CONNECTED" && echo "VULNERABLE: $proto supported"
done
# Check for specific weak ciphers
nmap --script ssl-enum-ciphers -p 443 target.com | grep -E "NULL|EXPORT|DES|RC4|MD5"
- HSTS and certificate pinning review
# Check for HSTS header
curl -sI https://target.com | grep -i strict-transport
# Check HSTS preload list status
curl -s "https://hstspreload.org/api/v2/status?domain=target.com" | jq '.'
# Look for Public-Key-Pins (deprecated but still seen)
curl -sI https://target.com | grep -i public-key-pins
- Certificate Authority validation
# Check if certificate is from a trusted CA
echo | openssl s_client -connect target.com:443 2>/dev/null | \
openssl x509 -noout -issuer -subject
# Detect self-signed certificates
echo | openssl s_client -connect target.com:443 2>/dev/null | \
openssl x509 -noout -issuer -subject | \
awk -F= '/issuer/{i=$NF}/subject/{s=$NF}END{if(i==s)print "SELF-SIGNED"}'
- OCSP and CRL revocation checking
# Check OCSP responder
openssl s_client -connect target.com:443 -status </dev/null 2>/dev/null | \
grep -A5 "OCSP Response"
# Extract and check CRL
openssl s_client -connect target.com:443 </dev/null 2>/dev/null | \
openssl x509 -noout -text | grep -A2 "CRL Distribution"
- Bulk certificate analysis across infrastructure
# Scan all hosts for certificate details
nmap -sV -p 443,8443,636,993,995,465 --script ssl-cert \
-iL ip-list.txt -oX cert-scan.xml
# Extract certificate details
xmlstarlet sel -t -m "//script[@id='ssl-cert']" \
-v "../../../address[@addrtype='ipv4']/@addr" -o ": " \
-v "@output" -n cert-scan.xml
Best Practices
- Monitor CT logs continuously with tools like certstream or Cert Spotter for new certificates issued under the target's domain.
- Report certificates expiring within 30 days as warnings and within 7 days as critical.
- Check non-443 TLS services (SMTPS/465, IMAPS/993, LDAPS/636) — they often have weaker configurations.
- Verify that certificate SANs match the intended scope — overly broad wildcards or unexpected SANs indicate misconfiguration.
- Test from multiple TLS client versions to identify inconsistent behavior across load balancer backends.
- Document the full certificate chain for each finding, including intermediate CA certificates.
Anti-Patterns
- Only checking port 443 — TLS runs on many ports. SMTP STARTTLS, LDAPS, database TLS, and custom application ports all need review.
- Ignoring certificate transparency as a recon source — CT logs are the single best source of subdomain discovery and are often underutilized.
- Dismissing TLS 1.0/1.1 as low risk — while exploitation requires specific conditions, regulatory frameworks (PCI DSS) require their removal, and they indicate poor security hygiene.
- Not testing OCSP stapling — without it, browsers may fail open on revocation checks, meaning a revoked certificate could still be trusted.
- Reporting weak ciphers without context — explain the actual attack scenario (BEAST, POODLE, SWEET32) rather than listing cipher names that mean nothing to the client.
Install this skill directly: skilldb add recon-agent-skills
Related Skills
osint-gathering
Open source intelligence collection, data leak checks, and metadata extraction for authorized assessments
service-inventory
Service inventory and technology fingerprinting for authorized security assessments
asn-ip-mapping
ASN/IP range awareness, WHOIS lookups, and BGP route analysis for authorized security assessments
asset-discovery
Asset discovery, DNS enumeration, and subdomain mapping for authorized security assessments
attack-surface-mapping
External attack surface mapping, forgotten asset detection, and domain drift analysis for authorized assessments
Mailtrap
Send and test email with Mailtrap. Use this skill when the project needs to integrate Mailtrap for email testing in development, transactional email sending in production, email previewing, HTML validation, spam score checking, or sandbox email capture. Covers both Mailtrap Email Testing (sandbox) and Mailtrap Email Sending (production transactional API).