auditing-tls-certificate-transparency-logs
它能做什么
这个系统会检查公开的安全证书记录(TLS CT 日志),找出是否有人在未经你允许的情况下为你的域名签发了安全证书。它还能帮你发现未知的子域名,并对可疑活动发出提醒。
适用场景
- ✓当你想知道是否有人在未经授权的情况下为你的域名签发了安全证书时。
- ✓发现你之前不知道存在的子域名时。
- ✓检测是否有人使用与你相似的安全证书进行欺诈时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/auditing-tls-certificate-transparency-logs/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“检查我的域名 example.com 和 sub.example.com 是否有未经授权签发的安全证书。”
每周 5 个新技能,1 分钟读完。
工作原理
它会查询公开的安全证书数据库(CT 日志),并借助 crt.sh 这个工具获取信息。然后,它会将这些信息与你已有的数据进行比对,对新出现或异常的活动发出提醒。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Auditing TLS Certificate Transparency Logs
When to Use
- Monitoring owned domains for unauthorized or unexpected certificate issuance by unknown Certificate Authorities
- Discovering subdomains and hidden services through certificates logged in public CT logs
- Detecting phishing infrastructure that uses look-alike domain certificates (typosquatting, homograph attacks)
- Auditing Certificate Authority compliance by verifying all issued certificates appear in CT logs as required by browser policies
- Building continuous certificate monitoring into a security operations pipeline with alerting for new issuances
Do not use for attacking or disrupting Certificate Authorities, for scraping CT logs in violation of rate limits or terms of service, or as the sole method of subdomain enumeration without corroborating results through DNS verification.
Prerequisites
- Python 3.10+ with
requests,cryptography, andpyOpenSSLlibraries installed - Network access to crt.sh (HTTPS) and public CT log servers
- A list of domains to monitor (owned domains, brand variations, typosquat candidates)
- SMTP credentials or webhook URL for alerting on new certificate discoveries
- Basic understanding of X.509 certificate structure and TLS certificate chain validation
Workflow
Step 1: Domain Inventory and Baseline
Build the initial certificate inventory for monitored domains:
- Define monitoring scope: List all owned root domains, registered brand names, and known subsidiaries. Include wildcard patterns (
%.example.com) for comprehensive subdomain coverage. - Query crt.sh for historical certificates: Use the crt.sh JSON API to retrieve all known certificates for each domain. The API endpoint
https://crt.sh/?q=%.example.com&output=jsonreturns certificates matching the wildcard pattern with fields includingissuer_ca_id,issuer_name,common_name,name_value,not_before,not_after, andserial_number. - Build baseline database: Store the initial certificate set in a local SQLite database with columns for certificate ID, domain, issuer, validity dates, SANs (Subject Alternative Names), and first-seen timestamp. This baseline prevents alerting on already-known certificates.
- Identify authorized CAs: From the baseline, extract the set of Certificate Authorities that have legitimately issued certificates for your domains. Any future issuance from a CA not in this set triggers a high-priority alert.
- Map subdomains: Extract all unique subdomains from the
name_valuefield across all certificates to build an initial subdomain inventory.
Step 2: Continuous CT Log Monitoring
Set up ongoing monitoring for new certificate issuances:
- Poll crt.sh periodically: Query the crt.sh API at regular intervals (every 15-60 minutes) for new certificates. Use the
exclude=expiredparameter to focus on currently valid certificates. Compare results against the baseline database to identify new entries. - Parse certificate details: For each new certificate, extract the full SAN list, issuer chain, validity period, key type and size, CT log SCT (Signed Certificate Timestamp) details, and certificate fingerprint (SHA-256).
- Detect precertificates: CT logs include precertificates (poisoned certificates submitted before final issuance). Track these as early warnings since they indicate a certificate is about to be issued but may not yet be active.
- Monitor CT log Signed Tree Heads (STH): For advanced monitoring, query CT log servers directly to fetch the latest STH and verify consistency proofs between consecutive tree heads. An inconsistency indicates log misbehavior (split-view attack).
- Rate limiting awareness: Respect crt.sh rate limits by spacing queries and caching responses. Implement exponential backoff on HTTP 429 responses. For high-volume monitoring, consider querying the crt.sh PostgreSQL interface directly at
crt.sh:5432. - Atom/RSS feed alternative: Subscribe to crt.sh's Atom feed for lighter-weight monitoring:
https://crt.sh/atom?q=%25.example.comprovides real-time notification of new log entries.
Step 3: Subdomain Discovery via CT Data
Extract and validate subdomains found in certificate transparency data:
- Wildcard expansion: Certificates with wildcard SANs (
*.dev.example.com) reveal the existence of subdomains that may not be in DNS zone files. Record the parent domain as a target for further enumeration.
…
常见问题
什么是证书透明度(CT)日志?
这是一种公开日志,负责签发安全证书(用于安全网站)的机构必须把它们签发的所有证书都记录在案。这有助于确保每一张证书都是合法的。
什么是 TLS 安全证书?
它是一种数字证书,用来确保网站确实是它所声称的那个站点,并且与它之间的通信是加密的(安全的)。浏览器地址栏里出现的小锁图标,就是它的功劳。
什么是子域名?
子域名是主域名的一部分。例如,“blog.example.com”和“shop.example.com”都是“example.com”的子域名。
详情
作者的原始描述
Monitors Certificate Transparency (CT) logs to detect unauthorized certificate issuance, discover subdomains via CT data, and alert on suspicious certificate activity for owned domains. Uses the crt.sh API and direct CT log querying based on RFC 6962 to build continuous monitoring pipelines that catch rogue certificates, track CA behavior, and map the external attack surface. Activates for request
热度
- GitHub 星标
- 35k
- 排名
- #7685
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。