QCecuring - Enterprise Security Solutions

Running a Certificate Risk Assessment: Step by Step

Certificate Discovery 11 Aug, 2026 · 05 Mins read

A complete methodology for running a certificate risk assessment, including scanning approaches, risk scoring frameworks, report templates, findings categorization, and remediation priorities.


Why Run a Certificate Risk Assessment?

Certificate-related outages cost enterprises an average of $300,000 per incident. Yet most organizations have never formally assessed the risk their certificate infrastructure carries. They know certificates exist. They know expiry is bad. But they don’t have a structured view of where risk concentrates.

A certificate risk assessment gives you that view. It answers three questions:

  1. What certificates do we have?
  2. Which ones represent risk?
  3. What do we fix first?

This guide provides the complete methodology, from scoping to final report.

Phase 1: Scoping and Preparation

Define Assessment Boundaries

Before scanning anything, define what’s in scope:

Assessment Scope Definition:
━━━━━━━━━━━━━━━━━━━━━━━━━━━
☐ External/public-facing certificates
☐ Internal network certificates
☐ Cloud-managed certificates (ACM, Key Vault)
☐ IoT/embedded device certificates
☐ Code signing certificates
☐ Email/S/MIME certificates
☐ Client authentication certificates
☐ VPN/IPSec certificates
☐ Wi-Fi/802.1X certificates

Stakeholder Identification

StakeholderRole in AssessmentInformation Needed From
CISO / Security DirectorExecutive sponsorBudget, authority
IT OperationsInfrastructure accessServer lists, network maps
DevOps / CloudCloud environment accessAWS/Azure/GCP accounts
Network TeamNetwork certificate accessLoad balancers, firewalls
Application TeamsApplication dependenciesService mappings
ComplianceRegulatory requirementsAudit findings, standards

Tools Preparation

# Assessment toolkit
sudo apt install nmap openssl jq curl

# Install specialized tools
pip install sslyze
go install github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
go install github.com/projectdiscovery/httpx/cmd/httpx@latest

# Verify tools
nmap --version
sslyze --version
subfinder -version

Phase 2: Discovery and Data Collection

External Discovery

#!/bin/bash
# external-discovery.sh
DOMAIN="$1"
OUTPUT="assessment-$DOMAIN-$(date +%Y%m%d)"
mkdir -p "$OUTPUT/external"

echo "=== External Certificate Discovery ==="

# CT Log enumeration
echo "[1/3] Querying Certificate Transparency logs..."
curl -s "https://crt.sh/?q=%.$DOMAIN&output=json" | \
  jq -r '.[].name_value' | sed 's/\*\.//g' | \
  sort -u > "$OUTPUT/external/ct-domains.txt"

# Subdomain enumeration
echo "[2/3] Running subdomain enumeration..."
subfinder -d "$DOMAIN" -all -silent >> "$OUTPUT/external/ct-domains.txt"
sort -u "$OUTPUT/external/ct-domains.txt" -o "$OUTPUT/external/all-domains.txt"

# Active scanning
echo "[3/3] Scanning active endpoints..."
cat "$OUTPUT/external/all-domains.txt" | \
  httpx -silent -tls-grab -json > "$OUTPUT/external/tls-scan.json"

echo "External discovery complete."
echo "Domains found: $(wc -l < "$OUTPUT/external/all-domains.txt")"
echo "Active HTTPS: $(wc -l < "$OUTPUT/external/tls-scan.json")"

Certificate Outage Cost Breakdown

Per-incident cost across three severity scenarios

$8,095

Conservative

$22,260

Moderate (typical)

$44,220

Severe

Internal Discovery

# internal-discovery.ps1 - Windows/AD environment scanning

# 1. Query AD CS for all issued certificates
certutil -view -out "RequestID,CommonName,NotAfter,CertificateTemplate" | 
  Out-File -FilePath "adcs-inventory.csv"

# 2. Scan internal network ranges for TLS services
$ranges = @("10.0.0.0/16", "172.16.0.0/12", "192.168.0.0/16")
foreach ($range in $ranges) {
    nmap -sV -p 443,8443,636,3389,5986 $range -oX "nmap-$($range -replace '/','_').xml"
}

# 3. Check certificate stores on domain-joined machines
$computers = Get-ADComputer -Filter * -Properties Name | Select-Object -ExpandProperty Name
foreach ($computer in $computers) {
    Invoke-Command -ComputerName $computer -ScriptBlock {
        Get-ChildItem Cert:\LocalMachine\My | 
          Select-Object Subject, NotAfter, Issuer, Thumbprint
    } -ErrorAction SilentlyContinue | 
      Export-Csv -Append -Path "machine-certs.csv"
}

Cloud Discovery

# AWS Certificate Manager
aws acm list-certificates --region us-east-1 --output json > aws-acm-certs.json
aws acm list-certificates --certificate-statuses EXPIRED INACTIVE --output json \
  >> aws-acm-certs.json

# Azure Key Vault (all vaults)
for vault in $(az keyvault list --query '[].name' -o tsv); do
  az keyvault certificate list --vault-name $vault -o json >> azure-kv-certs.json
done

# GCP Certificate Manager
gcloud certificate-manager certificates list --format=json > gcp-certs.json

Phase 3: Risk Scoring

Risk Scoring Framework

Each certificate receives a risk score based on multiple factors:

RISK SCORE = Impact × Likelihood × Exposure

Impact (1-5):
  5 = Customer-facing production service
  4 = Internal production service
  3 = Business-critical internal tool
  2 = Development/staging environment
  1 = Non-functional/informational

Likelihood (1-5):
  5 = Expired or expiring &lt;7 days
  4 = Expiring 7-30 days, no auto-renewal
  3 = Weak crypto (RSA &lt;2048, SHA-1)
  2 = Manual renewal process, 30-90 days out
  1 = Auto-renewal configured, &gt;90 days out

Exposure (1-5):
  5 = Internet-facing, handles sensitive data
  4 = Internet-facing, general service
  3 = Internal but broadly accessible
  2 = Internal, limited access
  1 = Isolated/air-gapped system

Automated Risk Scoring Script

#!/usr/bin/env python3
"""certificate_risk_scorer.py - Automated risk scoring for certificate findings"""

import json
import csv
from datetime import datetime, timezone

def calculate_risk_score(cert_data):
    """Calculate risk score for a certificate."""
    
    # Impact score
    impact = 1
    if cert_data.get('environment') == 'production':
        if cert_data.get('internet_facing'):
            impact = 5
        else:
            impact = 4
    elif cert_data.get('environment') == 'staging':
        impact = 2
    elif cert_data.get('business_critical'):
        impact = 3
    
    # Likelihood score
    likelihood = 1
    days_to_expiry = cert_data.get('days_to_expiry', 365)
    has_auto_renewal = cert_data.get('auto_renewal', False)
    key_size = cert_data.get('key_size', 2048)
    sig_algo = cert_data.get('signature_algorithm', 'sha256')
    
    if days_to_expiry <= 0:
        likelihood = 5
    elif days_to_expiry <= 7 and not has_auto_renewal:
        likelihood = 5
    elif days_to_expiry <= 30 and not has_auto_renewal:
        likelihood = 4
    elif key_size < 2048 or 'sha1' in sig_algo.lower():
        likelihood = 3
    elif days_to_expiry <= 90 and not has_auto_renewal:
        likelihood = 2
    
    # Exposure score
    exposure = 1
    if cert_data.get('internet_facing'):
        if cert_data.get('handles_sensitive_data'):
            exposure = 5
        else:
            exposure = 4
    elif cert_data.get('broadly_accessible'):
        exposure = 3
    elif cert_data.get('limited_access'):
        exposure = 2
    
    total_score = impact * likelihood * exposure
    max_score = 125  # 5 * 5 * 5
    normalized_score = round((total_score / max_score) * 10, 1)
    
    return {
        'impact': impact,
        'likelihood': likelihood,
        'exposure': exposure,
        'raw_score': total_score,
        'normalized_score': normalized_score,
        'risk_level': classify_risk(normalized_score)
    }

def classify_risk(score):
    """Classify risk level based on normalized score."""
    if score >= 8.0:
        return 'CRITICAL'
    elif score >= 6.0:
        return 'HIGH'
    elif score >= 4.0:
        return 'MEDIUM'
    elif score >= 2.0:
        return 'LOW'
    else:
        return 'INFORMATIONAL'

Phase 4: Findings Categorization

Category 1: Expired Certificates

┌─────────────────────────────────────────────────────┐
│ FINDING: Expired Certificates in Production          │
├─────────────────────────────────────────────────────┤
│ Risk Level: CRITICAL                                 │
│ Count: 7 certificates                               │
│ Avg. Days Expired: 23                               │
│                                                      │
│ Affected Systems:                                    │
│  • api-gateway.company.com (expired 12 days)        │
│  • partner-portal.company.com (expired 8 days)      │
│  • legacy-sso.company.com (expired 45 days)         │
│  • internal-wiki.company.com (expired 3 days)       │
│  • monitoring.company.com (expired 67 days)         │
│  • staging-api.company.com (expired 90 days)        │
│  • old-cdn.company.com (expired 120 days)           │
│                                                      │
│ Recommendation: Immediate renewal required           │
│ Timeline: 24-48 hours for critical services          │
└─────────────────────────────────────────────────────┘

Category 2: Weak Cryptography

CertificateAlgorithm IssueCurrentRequiredRisk
vpn.company.comRSA 1024-bit keyRSA-1024RSA-2048+HIGH
mail.company.comSHA-1 signatureSHA-1SHA-256+HIGH
intranet.company.comRSA 1024-bit keyRSA-1024RSA-2048+MEDIUM
dev-portal.company.comSHA-1 signatureSHA-1SHA-256+LOW

Category 3: Governance Gaps

Findings:
  • 7 different CAs in use with no central governance
  • 34% of certificates have no identified owner
  • 12 wildcard certificates deployed across 47 servers
  • No certificate policy documentation exists
  • Auto-renewal configured for only 23% of certificates
  • Average time from discovery to renewal: 4.2 days (reactive)

Category 4: Compliance Issues

StandardRequirementCurrent StateGap
PCI DSS 4.0Strong crypto for cardholder data3 weak certs in PCI scopeNon-compliant
SOXCertificate controls documentedNo documentationNon-compliant
NIST 800-52r2TLS 1.2+ only5 endpoints support TLS 1.1Non-compliant
Internal Policy90-day expiry alertsNo alerting existsNon-compliant

Phase 5: Report Generation

Executive Summary Template

# Certificate Risk Assessment - Executive Summary
Date: [Assessment Date]
Scope: [Internal/External/Both]
Assessed by: [Team/Individual]

## Key Findings
- Total certificates discovered: [N]
- Certificates with critical risk: [N] ([%])
- Certificates with high risk: [N] ([%])
- Estimated annual exposure: $[N] based on outage probability

## Top 3 Risks
1. [Highest risk finding with business impact]
2. [Second highest risk finding]
3. [Third highest risk finding]

## Recommendations
1. Immediate: [Action within 48 hours]
2. Short-term: [Action within 30 days]
3. Strategic: [Action within 90 days]

## Investment Required
- Immediate remediation: [Hours/Cost]
- Platform investment: [Cost]
- Ongoing management: [Cost/Year]

Detailed Technical Report Sections

1. Methodology
   1.1 Scope definition
   1.2 Tools used
   1.3 Scanning approach
   1.4 Risk scoring methodology

2. Discovery Results
   2.1 External certificates
   2.2 Internal certificates
   2.3 Cloud certificates
   2.4 Coverage gaps identified

3. Risk Analysis
   3.1 Critical findings
   3.2 High findings
   3.3 Medium findings
   3.4 Low findings
   3.5 Informational findings

4. Compliance Mapping
   4.1 PCI DSS alignment
   4.2 SOX control gaps
   4.3 Industry framework alignment

5. Remediation Roadmap
   5.1 Immediate actions (0-7 days)
   5.2 Short-term actions (7-30 days)
   5.3 Medium-term actions (30-90 days)
   5.4 Strategic initiatives (90+ days)

6. Appendix
   6.1 Full certificate inventory
   6.2 Raw scan data
   6.3 Tool configurations

Phase 6: Remediation Prioritization

Priority Matrix

         HIGH IMPACT

    ┌─────────┼─────────┐
    │ P2      │ P1      │
    │ Quick   │ URGENT  │
    │ Wins    │ Fix Now │
    │         │         │
────┼─────────┼─────────┼────
    │         │         │  HIGH
    │ P4      │ P3      │  LIKELIHOOD
    │ Monitor │ Plan    │
    │         │ & Fix   │
    └─────────┼─────────┘

         LOW IMPACT
PriorityActionTimelineOwner
P1Replace expired production certs24-48 hoursSecurity + Ops
P1Rotate exposed wildcard keys48-72 hoursSecurity
P2Upgrade weak crypto algorithms1-2 weeksOps
P2Establish CA governance policy2-3 weeksSecurity
P3Implement auto-renewal4-6 weeksDevOps
P3Deploy monitoring/alerting4-6 weeksOps
P4Full CLM platform deployment8-12 weeksAll teams

Running This Assessment Quarterly

A one-time assessment provides a snapshot. Real risk management requires ongoing assessment:

FrequencyActivityPurpose
WeeklyAutomated expiry scanningCatch approaching deadlines
MonthlyNew certificate discoveryDetect sprawl
QuarterlyFull risk assessmentUpdate risk posture
AnnuallyCompliance mapping reviewMaintain audit readiness

The goal is to move from quarterly assessments to continuous monitoring — where every new certificate is automatically discovered, scored, and tracked from the moment it’s issued.


About QCecuring

QCecuring helps enterprises run continuous certificate risk assessments through automated discovery, real-time scoring, and proactive alerting. Our platform turns the manual assessment process described here into an always-on capability.

Tags: certificate risk assessment, risk scoring, vulnerability assessment, certificate discovery, compliance, remediation planning, security assessment, PKI audit, enterprise security, risk management

Stay Ahead on Crypto & PKI

Monthly insights on certificate management, post-quantum readiness, and enterprise security.

Subscribe Free

Related Insights

Certificate Lifecycle Management

What a $0 Certificate Outage Prevention Strategy Looks Like

Free and open-source approaches to certificate monitoring using PowerShell scripts, certutil queries, cron jobs, and Prometheus exporters — when free is enough and when you've outgrown it.

By Mani sri kumar

18 Aug, 2026 · 06 Mins read

Certificate Lifecycle ManagementEnterprise Security

Certificate Lifecycle Management

How to Convince Your Manager You Need Certificate Visibility

Champion enablement content with talking points for budget approval, cost justification frameworks, risk framing, one-pager templates, and objection handling for certificate lifecycle management.

By Mani sri kumar

17 Aug, 2026 · 06 Mins read

Certificate Lifecycle ManagementEnterprise Security

PKI Architecture

PKI for IT Teams: What You Actually Need to Know (No Crypto Theory)

A practical PKI explainer for IT operations teams — skip the math, focus on what breaks, how certs work in enterprise, CA hierarchy simplified, and what IT teams interact with daily.

By Mani sri kumar

16 Aug, 2026 · 05 Mins read

PKI ArchitectureEnterprise Security

Ready to Secure Your Enterprise?

Experience how our cryptographic solutions simplify, centralize, and automate identity management for your entire organization.

Stay ahead on cryptography & PKI

Get monthly insights on certificate management, post-quantum readiness, and enterprise security. No spam.

We respect your privacy. Unsubscribe anytime.