Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save emadshanab/061e9290c0381f535055b40baf75ae13 to your computer and use it in GitHub Desktop.

Select an option

Save emadshanab/061e9290c0381f535055b40baf75ae13 to your computer and use it in GitHub Desktop.
Exposed Internal PKI Infrastructure Detection nuclei template
id: exposed-pki-infrastructure
info:
name: Exposed Internal PKI Infrastructure Detection
author: nullenc0de
severity: critical
description: Detects exposed internal PKI infrastructure including CRL distribution points and OCSP responders
tags: pki,exposure,misconfig
requests:
- method: GET
path:
- "{{BaseURL}}/certsrv/"
- "{{BaseURL}}/pki/"
- "{{BaseURL}}/crl/"
- "{{BaseURL}}/.well-known/pki-validation/"
- "{{BaseURL}}/ocsp/"
- "{{BaseURL}}/CertEnroll/"
- "{{BaseURL}}/CertSrv/"
matchers-condition: or
matchers:
- type: word
words:
- "Microsoft-IIS/10.0"
- "certsrv"
- "Certificate Services"
- "Microsoft CA"
- "Certificate Authority"
- "CRL Distribution Point"
- "OCSP Responder"
condition: or
- type: status
status:
- 200
- 401
- 403
- type: regex
regex:
- "CN=[A-Za-z0-9-]+-CA"
- "\.crl$"
- "\.cer$"
- "\.p7b$"
extractors:
- type: regex
name: certificate_details
regex:
- "CN=[A-Za-z0-9-]+-CA"
- "O=[A-Za-z0-9 ]+"
- "OU=[A-Za-z0-9 ]+"
Stop-If-Match: true
http:
- max-redirects: 2
- follow-redirects: true
- tls-verification: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment