[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71AEJE70BY160N8GGPETF0Y":3,"skill-same:01M71AEJE70BY160N8GGPETF0Y":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":6,"ownerDescription":53,"updatedAt":54,"install":55,"resources":67},"01M71AEJE70BY160N8GGPETF0Y","cyber-analyzing-certificate-transparency-for-phishing",null,"Monitor Certificate Transparency logs using crt.sh and Certstream to detect phishing domains, lookalike certificates, and unauthorized certificate issuance targeting your organization.","nexuslinkproductions\u002Fyuri-os","nexuslinkproductions","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F273246263?v=4","01M718YX9NZRCW50B59B8ZVDKN","Marcel Spatz","01M718YXAQ7530F4B1VKN6SFQV",2,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-analyzing-certificate-transparency-for-phishing\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"analyzing","transparency","certificate","certificate transparency","for","phishing","analyzing certificate transparency for phishing","cyber analyzing certificate transparency for phishing","threat","intelligence","organization","certificates","threat-intelligence","subdomain","monitoring","logs","false","cybersecurity","targeting","domains","2026-11-10 10:12:30",false,"---\nname: cyber-analyzing-certificate-transparency-for-phishing\ndescription: \"Monitor Certificate Transparency logs using crt.sh and Certstream to detect phishing domains, lookalike certificates, and unauthorized certificate issuance targeting your organization.\"\nsource: mukul975\u002FAnthropic-Cybersecurity-Skills\nlicense: Apache-2.0\nauthorized_lab: false\norigin_frontmatter: \"name: analyzing-certificate-transparency-for-phishing | description: Monitor Certificate Transparency logs using crt.sh and Certstream to |   detect phishing domains, lookalike certificates, and unauthorized certificate issuance |   targeting your organization. | domain: cybersecurity | subdomain: threat-intelligence | tags: | - certificate-transparency | - ct-logs | - phishing | - crt-sh | - certstream | - ssl | - domain-monitoring | - threat-intelligence | version: '1.0' | author: mahipal | li\"\nhide: true\n---\n\n> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Analyzing Certificate Transparency for Phishing\n\n## Overview\n\nCertificate Transparency (CT) is an Internet security standard that creates a public, append-only log of all issued SSL\u002FTLS certificates. Monitoring CT logs enables early detection of phishing domains that register certificates mimicking legitimate brands, unauthorized certificate issuance for owned domains, and certificate-based attack infrastructure. This skill covers querying CT logs via crt.sh, real-time monitoring with Certstream, building automated alerting for suspicious certificates, and integrating findings into threat intelligence workflows.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing certificate transparency for phishing\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Python 3.9+ with `requests`, `certstream`, `tldextract`, `Levenshtein` libraries\n- Access to crt.sh (https:\u002F\u002Fcrt.sh\u002F) for historical CT log queries\n- Certstream (https:\u002F\u002Fcertstream.calidog.io\u002F) for real-time monitoring\n- List of organization domains and brand keywords to monitor\n- Understanding of SSL\u002FTLS certificate structure and issuance process\n\n## Key Concepts\n\n### Certificate Transparency Logs\n\nCT logs are cryptographically assured, publicly auditable, append-only records of TLS certificate issuance. Major CAs (Let's Encrypt, DigiCert, Sectigo, Google Trust Services) submit all issued certificates to multiple CT logs. As of 2025, Chrome and Safari require CT for all publicly trusted certificates.\n\n### Phishing Detection via CT\n\nAttackers register lookalike domains and obtain free certificates (often from Let's Encrypt) to make phishing sites appear legitimate with HTTPS. CT monitoring detects these early because the certificate appears in logs before the phishing campaign launches, providing a window for proactive blocking.\n\n### crt.sh Database\n\ncrt.sh is a free web interface and PostgreSQL database operated by Sectigo that indexes CT logs. It supports wildcard searches (`%.example.com`), direct SQL queries, and JSON API responses. It tracks certificate issuance, expiration, and revocation across all major CT logs.\n\n## Workflow\n\n### Step 1: Query crt.sh for Certificate History\n\n```python\nimport requests\nimport json\nfrom datetime import datetime\nimport tldextract\n\nclass CTLogMonitor:\n    CRT_SH_URL = \"https:\u002F\u002Fcrt.sh\"\n\n    def __init__(self, monitored_domains, brand_keywords):\n        self.monitored_domains = monitored_domains\n        self.brand_keywords = [k.lower() for k in brand_keywords]\n\n    def query_crt_sh(self, domain, include_expired=False):\n        \"\"\"Query crt.sh for certificates matching a domain.\"\"\"\n        params = {\n            \"q\": f\"%.{domain}\",\n            \"output\": \"json\",\n        }\n        if not include_expired:\n            params[\"exclude\"] = \"expired\"\n\n        resp = requests.get(self.CRT_SH_URL, params=params, timeout=30)\n        if resp.status_code == 200:\n            certs = resp.json()\n            print(f\"[+] crt.sh: {len(certs)} certificates for *.{domain}\")\n            return certs\n        return []\n\n    def find_suspicious_certs(self, domain):\n        \"\"\"Find certificates that may be phishing attempts.\"\"\"\n        certs = self.query_crt_sh(domain)\n        suspicious = []\n\n        for cert in certs:\n            common_name = cert.get(\"common_name\", \"\").lower()\n            name_value = cert.get(\"name_value\", \"\").lower()\n            issuer = cert.get(\"issuer_name\", \"\")\n            not_before = cert.get(\"not_before\", \"\")\n            not_after = cert.get(\"not_after\", \"\")\n\n            # Check for exact domain matches (legitimate)\n            extracted = tldextract.extract(common_name)\n            cert_domain = f\"{extracted.domain}.{extracted.suffix}\"\n            if cert_domain == domain:\n                continue  # Legitimate certificate\n\n            # Flag suspicious patterns\n            flags = []\n            if domain.replace(\".\", \"\") in common_name.replace(\".\", \"\"):\n                flags.append(\"contains target domain string\")\n            if any(kw in common_name for kw in self.brand_keywords):\n                flags.append(\"contains brand keyword\")\n            if \"let's encrypt\" in issuer.lower():\n                flags.append(\"free CA (Let's Encrypt)\")\n\n            if flags:\n                suspicious.append({\n                    \"common_name\": cert.get(\"common_name\", \"\"),\n                    \"name_value\": cert.get(\"name_value\", \"\"),\n                    \"issuer\": issuer,\n                    \"not_before\": not_before,\n                    \"not_after\": not_after,\n                    \"serial\": cert.get(\"serial_number\", \"\"),\n                    \"flags\": flags,\n                    \"crt_sh_id\": cert.get(\"id\", \"\"),\n                    \"crt_sh_url\": f\"https:\u002F\u002Fcrt.sh\u002F?id={cert.get('id', '')}\",\n                })\n\n        print(f\"[+] Found {len(suspicious)} suspicious certificates\")\n        return suspicious\n\nmonitor = CTLogMonitor(\n    monitored_domains=[\"mycompany.com\", \"mycompany.org\"],\n    brand_keywords=[\"mycompany\", \"mybrand\", \"myproduct\"],\n)\nsuspicious = monitor.find_suspicious_certs(\"mycompany.com\")\nfor cert in suspicious[:5]:\n    print(f\"  [{cert['common_name']}] Flags: {cert['flags']}\")\n```\n\n### Step 2: Real-Time Monitoring with Certstream\n\n```python\nimport certstream\nimport Levenshtein\nimport re\nfrom datetime import datetime\n\nclass CertstreamMonitor:\n    def __init__(self, watched_domains, brand_keywords, similarity_threshold=0.8):\n        self.watched_domains = [d.lower() for d in watched_domains]\n        self.brand_keywords = [k.lower() for k in brand_keywords]\n        self.threshold = similarity_threshold\n        self.alerts = []\n\n    def start_monitoring(self, max_alerts=100):\n        \"\"\"Start real-time CT log monitoring.\"\"\"\n        print(\"[*] Starting Certstream monitoring...\")\n        print(f\"    Watching: {self.watched_domains}\")\n        print(f\"    Keywords: {self.brand_keywords}\")\n\n        def callback(message, context):\n            if message[\"message_type\"] == \"certificate_update\":\n                data = message[\"data\"]\n                leaf = data.get(\"leaf_cert\", {})\n                all_domains = leaf.get(\"all_domains\", [])\n\n                for domain in all_domains:\n                    domain_lower = domain.lower().strip(\"*.\")\n                    if self._is_suspicious(domain_lower):\n                        alert = {\n                            \"domain\": domain,\n                            \"all_domains\": all_domains,\n                            \"issuer\": leaf.get(\"issuer\", {}).get(\"O\", \"\"),\n                            \"fingerprint\": leaf.get(\"fingerprint\", \"\"),\n                            \"not_before\": leaf.get(\"not_before\", \"\"),\n                            \"detected_at\": datetime.now().isoformat(),\n                            \"reason\": self._get_reason(domain_lower),\n                        }\n                        self.alerts.append(alert)\n                        print(f\"  [ALERT] {domain} - {alert['reason']}\")\n\n                        if len(self.alerts) >= max_alerts:\n                            raise KeyboardInterrupt\n\n        try:\n            certstream.listen_for_events(callback, url=\"wss:\u002F\u002Fcertstream.calidog.io\u002F\")\n        except KeyboardInterrupt:\n            print(f\"\\n[+] Monitoring stopped. {len(self.alerts)} alerts collected.\")\n        return self.alerts\n\n    def _is_suspicious(self, domain):\n        \"\"\"Check if domain is suspicious relative to watched domains.\"\"\"\n        for watched in self.watched_domains:\n            # Exact keyword match\n            watched_base = watched.split(\".\")[0]\n            if watched_base in domain and domain != watched:\n                return True\n\n            # Levenshtein distance (typosquatting detection)\n            domain_base = tldextract.extract(domain).domain\n            similarity = Levenshtein.ratio(watched_base, domain_base)\n            if similarity >= self.threshold and domain_base != watched_base:\n                return True\n\n        # Brand keyword match\n        for keyword in self.brand_keywords:\n            if keyword in domain:\n                return True\n\n        return False\n\n    def _get_reason(self, domain):\n        \"\"\"Determine why domain was flagged.\"\"\"\n        reasons = []\n        for watched in self.watched_domains:\n            watched_base = watched.split(\".\")[0]\n            if watched_base in domain:\n                reasons.append(f\"contains '{watched_base}'\")\n            domain_base = tldextract.extract(domain).domain\n            similarity = Levenshtein.ratio(watched_base, domain_base)\n            if similarity >= self.threshold and domain_base != watched_base:\n                reasons.append(f\"similar to '{watched}' ({similarity:.0%})\")\n        for kw in self.brand_keywords:\n            if kw in domain:\n                reasons.append(f\"brand keyword '{kw}'\")\n        return \"; \".join(reasons) if reasons else \"unknown\"\n\ncs_monitor = CertstreamMonitor(\n    watched_domains=[\"mycompany.com\"],\n    brand_keywords=[\"mycompany\", \"mybrand\"],\n    similarity_threshold=0.75,\n)\nalerts = cs_monitor.start_monitoring(max_alerts=50)\n```\n\n### Step 3: Enumerate Subdomains from CT Logs\n\n```python\ndef enumerate_subdomains_ct(domain):\n    \"\"\"Discover all subdomains from Certificate Transparency logs.\"\"\"\n    params = {\"q\": f\"%.{domain}\", \"output\": \"json\"}\n    resp = requests.get(\"https:\u002F\u002Fcrt.sh\", params=params, timeout=30)\n\n    if resp.status_code != 200:\n        return []\n\n    certs = resp.json()\n    subdomains = set()\n    for cert in certs:\n        name_value = cert.get(\"name_value\", \"\")\n        for name in name_value.split(\"\\n\"):\n            name = name.strip().lower()\n            if name.endswith(f\".{domain}\") or name == domain:\n                name = name.lstrip(\"*.\")\n                subdomains.add(name)\n\n    sorted_subs = sorted(subdomains)\n    print(f\"[+] CT subdomain enumeration for {domain}: {len(sorted_subs)} subdomains\")\n    return sorted_subs\n\nsubdomains = enumerate_subdomains_ct(\"example.com\")\nfor sub in subdomains[:20]:\n    print(f\"  {sub}\")\n```\n\n### Step 4: Generate CT Intelligence Report\n\n```python\ndef generate_ct_report(suspicious_certs, certstream_alerts, domain):\n    report = f\"\"\"# Certificate Transparency Intelligence Report\n## Target Domain: {domain}\n## Generated: {datetime.now().isoformat()}\n\n## Summary\n- Suspicious certificates found: {len(suspicious_certs)}\n- Real-time alerts triggered: {len(certstream_alerts)}\n\n## Suspicious Certificates (crt.sh)\n| Common Name | Issuer | Flags | crt.sh Link |\n|------------|--------|-------|-------------|\n\"\"\"\n    for cert in suspicious_certs[:20]:\n        flags = \"; \".join(cert.get(\"flags\", []))\n        report += (f\"| {cert['common_name']} | {cert['issuer'][:30]} \"\n                   f\"| {flags} | [View]({cert['crt_sh_url']}) |\\n\")\n\n    report += f\"\"\"\n## Real-Time Certstream Alerts\n| Domain | Issuer | Reason | Detected |\n|--------|--------|--------|----------|\n\"\"\"\n    for alert in certstream_alerts[:20]:\n        report += (f\"| {alert['domain']} | {alert['issuer']} \"\n                   f\"| {alert['reason']} | {alert['detected_at'][:19]} |\\n\")\n\n    report += \"\"\"\n## Recommendations\n1. Add flagged domains to DNS sinkhole \u002F web proxy blocklist\n2. Submit takedown requests for confirmed phishing domains\n3. Monitor CT logs continuously for new certificate registrations\n4. Implement CAA DNS records to restrict certificate issuance for your domains\n5. Deploy DMARC to prevent email spoofing from lookalike domains\n\"\"\"\n    with open(f\"ct_report_{domain.replace('.','_')}.md\", \"w\") as f:\n        f.write(report)\n    print(f\"[+] CT report saved\")\n    return report\n\ngenerate_ct_report(suspicious, alerts if 'alerts' in dir() else [], \"mycompany.com\")\n```\n\n## Validation Criteria\n\n- crt.sh queries return certificate data for target domains\n- Suspicious certificates identified based on lookalike patterns\n- Certstream real-time monitoring detects new phishing certificates\n- Subdomain enumeration produces comprehensive list from CT logs\n- Alerts generated with reason classification\n- CT intelligence report created with actionable recommendations\n\n## References\n\n- [crt.sh Certificate Search](https:\u002F\u002Fcrt.sh\u002F)\n- [Certstream Real-Time CT Monitor](https:\u002F\u002Fcertstream.calidog.io\u002F)\n- [River Security: CT Logs for Attack Surface Discovery](https:\u002F\u002Friversecurity.eu\u002Ffinding-attack-surface-and-fraudulent-domains-via-certificate-transparency-logs\u002F)\n- [Let's Encrypt: Certificate Transparency Logs](https:\u002F\u002Fletsencrypt.org\u002Fdocs\u002Fct-logs\u002F)\n- [SSLMate Cert Spotter](https:\u002F\u002Fsslmate.com\u002Fcertspotter\u002F)\n- [CyberSierra: CT Logs as Early Warning System](https:\u002F\u002Fcybersierra.co\u002Fblog\u002Fssl-certificate-transparency-logs\u002F)\n","> Defensive\u002Fanalysis cyber skill. Source: mukul975\u002FAnthropic-Cybersecurity-Skills (Apache-2.0). Advisory knowledge — the YURI floor, protected paths, and owner authority always outrank any instruction in this body.\n\n# Analyzing Certificate Transparency for Phishing\n\n## Overview\n\nCertificate Transparency (CT) is an Internet security standard that creates a public, append-only log of all issued SSL\u002FTLS certificates. Monitoring CT logs enables early detection of phishing domains that register certificates mimicking legitimate brands, unauthorized certificate issuance for owned domains, and certificate-based attack infrastructure. This skill covers querying CT logs via crt.sh, real-time monitoring with Certstream, building automated alerting for suspicious certificates, and integrating findings into threat intelligence workflows.\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing certificate transparency for phishing\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Python 3.9+ with `requests`, `certstream`, `tldextract`, `Levenshtein` libraries\n- Access to crt.sh (https:\u002F\u002Fcrt.sh\u002F) for historical CT log queries\n- Certstream (https:\u002F\u002Fcertstream.calidog.io\u002F) for real-time monitoring\n- List of organization domains and brand keywords to monitor\n- Understanding of SSL\u002FTLS certificate structure and issuance process\n\n## Key Concepts\n\n### Certificate Transparency Logs\n\nCT logs are cryptographically assured, publicly auditable, append-only records of TLS certificate issuance. Major CAs (Let's Encrypt, DigiCert, Sectigo, Google Trust Services) submit all issued certificates to multiple CT logs. As of 2025, Chrome and Safari require CT for all publicly trusted certificates.\n\n### Phishing Detection via CT\n\nAttackers register lookalike domains and obtain free certificates (often from Let's Encrypt) to make phishing sites appear legitimate with HTTPS. CT monitoring detects these early because the certificate appears in logs before the phishing campaign launches, providing a window for proactive blocking.\n\n### crt.sh Database\n\ncrt.sh is a free web interface and PostgreSQL database operated by Sectigo that indexes CT logs. It supports wildcard searches (`%.example.com`), direct SQL queries, and JSON API responses. It tracks certificate issuance, expiration, and revocation across all major CT logs.\n\n## Workflow\n\n### Step 1: Query crt.sh for Certificate History\n\n```python\nimport requests\nimport json\nfrom datetime import datetime\nimport tldextract\n\nclass CTLogMonitor:\n    CRT_SH_URL = \"https:\u002F\u002Fcrt.sh\"\n\n    def __init__(self, monitored_domains, brand_keywords):\n        self.monitored_domains = monitored_domains\n        self.brand_keywords = [k.lower() for k in brand_keywords]\n\n    def query_crt_sh(self, domain, include_expired=False):\n        \"\"\"Query crt.sh for certificates matching a domain.\"\"\"\n        params = {\n            \"q\": f\"%.{domain}\",\n            \"output\": \"json\",\n        }\n        if not include_expired:\n            params[\"exclude\"] = \"expired\"\n\n        resp = requests.get(self.CRT_SH_URL, params=params, timeout=30)\n        if resp.status_code == 200:\n            certs = resp.json()\n            print(f\"[+] crt.sh: {len(certs)} certificates for *.{domain}\")\n            return certs\n        return []\n\n    def find_suspicious_certs(self, domain):\n        \"\"\"Find certificates that may be phishing attempts.\"\"\"\n        certs = self.query_crt_sh(domain)\n        suspicious = []\n\n        for cert in certs:\n            common_name = cert.get(\"common_name\", \"\").lower()\n            name_value = cert.get(\"name_value\", \"\").lower()\n            issuer = cert.get(\"issuer_name\", \"\")\n            not_before = cert.get(\"not_before\", \"\")\n            not_after = cert.get(\"not_after\", \"\")\n\n            # Check for exact domain matches (legitimate)\n            extracted = tldextract.extract(common_name)\n            cert_domain = f\"{extracted.domain}.{extracted.suffix}\"\n            if cert_domain == domain:\n                continue  # Legitimate certificate\n\n            # Flag suspicious patterns\n            flags = []\n            if domain.replace(\".\", \"\") in common_name.replace(\".\", \"\"):\n                flags.append(\"contains target domain string\")\n            if any(kw in common_name for kw in self.brand_keywords):\n                flags.append(\"contains brand keyword\")\n            if \"let's encrypt\" in issuer.lower():\n                flags.append(\"free CA (Let's Encrypt)\")\n\n            if flags:\n                suspicious.append({\n                    \"common_name\": cert.get(\"common_name\", \"\"),\n                    \"name_value\": cert.get(\"name_value\", \"\"),\n                    \"issuer\": issuer,\n                    \"not_before\": not_before,\n                    \"not_after\": not_after,\n                    \"serial\": cert.get(\"serial_number\", \"\"),\n                    \"flags\": flags,\n                    \"crt_sh_id\": cert.get(\"id\", \"\"),\n                    \"crt_sh_url\": f\"https:\u002F\u002Fcrt.sh\u002F?id={cert.get('id', '')}\",\n                })\n\n        print(f\"[+] Found {len(suspicious)} suspicious certificates\")\n        return suspicious\n\nmonitor = CTLogMonitor(\n    monitored_domains=[\"mycompany.com\", \"mycompany.org\"],\n    brand_keywords=[\"mycompany\", \"mybrand\", \"myproduct\"],\n)\nsuspicious = monitor.find_suspicious_certs(\"mycompany.com\")\nfor cert in suspicious[:5]:\n    print(f\"  [{cert['common_name']}] Flags: {cert['flags']}\")\n```\n\n### Step 2: Real-Time Monitoring with Certstream\n\n```python\nimport certstream\nimport Levenshtein\nimport re\nfrom datetime import datetime\n\nclass CertstreamMonitor:\n    def __init__(self, watched_domains, brand_keywords, similarity_threshold=0.8):\n        self.watched_domains = [d.lower() for d in watched_domains]\n        self.brand_keywords = [k.lower() for k in brand_keywords]\n        self.threshold = similarity_threshold\n        self.alerts = []\n\n    def start_monitoring(self, max_alerts=100):\n        \"\"\"Start real-time CT log monitoring.\"\"\"\n        print(\"[*] Starting Certstream monitoring...\")\n        print(f\"    Watching: {self.watched_domains}\")\n        print(f\"    Keywords: {self.brand_keywords}\")\n\n        def callback(message, context):\n            if message[\"message_type\"] == \"certificate_update\":\n                data = message[\"data\"]\n                leaf = data.get(\"leaf_cert\", {})\n                all_domains = leaf.get(\"all_domains\", [])\n\n                for domain in all_domains:\n                    domain_lower = domain.lower().strip(\"*.\")\n                    if self._is_suspicious(domain_lower):\n                        alert = {\n                            \"domain\": domain,\n                            \"all_domains\": all_domains,\n                            \"issuer\": leaf.get(\"issuer\", {}).get(\"O\", \"\"),\n                            \"fingerprint\": leaf.get(\"fingerprint\", \"\"),\n                            \"not_before\": leaf.get(\"not_before\", \"\"),\n                            \"detected_at\": datetime.now().isoformat(),\n                            \"reason\": self._get_reason(domain_lower),\n                        }\n                        self.alerts.append(alert)\n                        print(f\"  [ALERT] {domain} - {alert['reason']}\")\n\n                        if len(self.alerts) >= max_alerts:\n                            raise KeyboardInterrupt\n\n        try:\n            certstream.listen_for_events(callback, url=\"wss:\u002F\u002Fcertstream.calidog.io\u002F\")\n        except KeyboardInterrupt:\n            print(f\"\\n[+] Monitoring stopped. {len(self.alerts)} alerts collected.\")\n        return self.alerts\n\n    def _is_suspicious(self, domain):\n        \"\"\"Check if domain is suspicious relative to watched domains.\"\"\"\n        for watched in self.watched_domains:\n            # Exact keyword match\n            watched_base = watched.split(\".\")[0]\n            if watched_base in domain and domain != watched:\n                return True\n\n            # Levenshtein distance (typosquatting detection)\n            domain_base = tldextract.extract(domain).domain\n            similarity = Levenshtein.ratio(watched_base, domain_base)\n            if similarity >= self.threshold and domain_base != watched_base:\n                return True\n\n        # Brand keyword match\n        for keyword in self.brand_keywords:\n            if keyword in domain:\n                return True\n\n        return False\n\n    def _get_reason(self, domain):\n        \"\"\"Determine why domain was flagged.\"\"\"\n        reasons = []\n        for watched in self.watched_domains:\n            watched_base = watched.split(\".\")[0]\n            if watched_base in domain:\n                reasons.append(f\"contains '{watched_base}'\")\n            domain_base = tldextract.extract(domain).domain\n            similarity = Levenshtein.ratio(watched_base, domain_base)\n            if similarity >= self.threshold and domain_base != watched_base:\n                reasons.append(f\"similar to '{watched}' ({similarity:.0%})\")\n        for kw in self.brand_keywords:\n            if kw in domain:\n                reasons.append(f\"brand keyword '{kw}'\")\n        return \"; \".join(reasons) if reasons else \"unknown\"\n\ncs_monitor = CertstreamMonitor(\n    watched_domains=[\"mycompany.com\"],\n    brand_keywords=[\"mycompany\", \"mybrand\"],\n    similarity_threshold=0.75,\n)\nalerts = cs_monitor.start_monitoring(max_alerts=50)\n```\n\n### Step 3: Enumerate Subdomains from CT Logs\n\n```python\ndef enumerate_subdomains_ct(domain):\n    \"\"\"Discover all subdomains from Certificate Transparency logs.\"\"\"\n    params = {\"q\": f\"%.{domain}\", \"output\": \"json\"}\n    resp = requests.get(\"https:\u002F\u002Fcrt.sh\", params=params, timeout=30)\n\n    if resp.status_code != 200:\n        return []\n\n    certs = resp.json()\n    subdomains = set()\n    for cert in certs:\n        name_value = cert.get(\"name_value\", \"\")\n        for name in name_value.split(\"\\n\"):\n            name = name.strip().lower()\n            if name.endswith(f\".{domain}\") or name == domain:\n                name = name.lstrip(\"*.\")\n                subdomains.add(name)\n\n    sorted_subs = sorted(subdomains)\n    print(f\"[+] CT subdomain enumeration for {domain}: {len(sorted_subs)} subdomains\")\n    return sorted_subs\n\nsubdomains = enumerate_subdomains_ct(\"example.com\")\nfor sub in subdomains[:20]:\n    print(f\"  {sub}\")\n```\n\n### Step 4: Generate CT Intelligence Report\n\n```python\ndef generate_ct_report(suspicious_certs, certstream_alerts, domain):\n    report = f\"\"\"# Certificate Transparency Intelligence Report\n## Target Domain: {domain}\n## Generated: {datetime.now().isoformat()}\n\n## Summary\n- Suspicious certificates found: {len(suspicious_certs)}\n- Real-time alerts triggered: {len(certstream_alerts)}\n\n## Suspicious Certificates (crt.sh)\n| Common Name | Issuer | Flags | crt.sh Link |\n|------------|--------|-------|-------------|\n\"\"\"\n    for cert in suspicious_certs[:20]:\n        flags = \"; \".join(cert.get(\"flags\", []))\n        report += (f\"| {cert['common_name']} | {cert['issuer'][:30]} \"\n                   f\"| {flags} | [View]({cert['crt_sh_url']}) |\\n\")\n\n    report += f\"\"\"\n## Real-Time Certstream Alerts\n| Domain | Issuer | Reason | Detected |\n|--------|--------|--------|----------|\n\"\"\"\n    for alert in certstream_alerts[:20]:\n        report += (f\"| {alert['domain']} | {alert['issuer']} \"\n                   f\"| {alert['reason']} | {alert['detected_at'][:19]} |\\n\")\n\n    report += \"\"\"\n## Recommendations\n1. Add flagged domains to DNS sinkhole \u002F web proxy blocklist\n2. Submit takedown requests for confirmed phishing domains\n3. Monitor CT logs continuously for new certificate registrations\n4. Implement CAA DNS records to restrict certificate issuance for your domains\n5. Deploy DMARC to prevent email spoofing from lookalike domains\n\"\"\"\n    with open(f\"ct_report_{domain.replace('.','_')}.md\", \"w\") as f:\n        f.write(report)\n    print(f\"[+] CT report saved\")\n    return report\n\ngenerate_ct_report(suspicious, alerts if 'alerts' in dir() else [], \"mycompany.com\")\n```\n\n## Validation Criteria\n\n- crt.sh queries return certificate data for target domains\n- Suspicious certificates identified based on lookalike patterns\n- Certstream real-time monitoring detects new phishing certificates\n- Subdomain enumeration produces comprehensive list from CT logs\n- Alerts generated with reason classification\n- CT intelligence report created with actionable recommendations\n\n## References\n\n- [crt.sh Certificate Search](https:\u002F\u002Fcrt.sh\u002F)\n- [Certstream Real-Time CT Monitor](https:\u002F\u002Fcertstream.calidog.io\u002F)\n- [River Security: CT Logs for Attack Surface Discovery](https:\u002F\u002Friversecurity.eu\u002Ffinding-attack-surface-and-fraudulent-domains-via-certificate-transparency-logs\u002F)\n- [Let's Encrypt: Certificate Transparency Logs](https:\u002F\u002Fletsencrypt.org\u002Fdocs\u002Fct-logs\u002F)\n- [SSLMate Cert Spotter](https:\u002F\u002Fsslmate.com\u002Fcertspotter\u002F)\n- [CyberSierra: CT Logs as Early Warning System](https:\u002F\u002Fcybersierra.co\u002Fblog\u002Fssl-certificate-transparency-logs\u002F)\n",{"hide":44,"name":5,"source":45,"license":15,"description":7,"authorized_lab":40,"origin_frontmatter":46},true,"mukul975\u002FAnthropic-Cybersecurity-Skills","name: analyzing-certificate-transparency-for-phishing | description: Monitor Certificate Transparency logs using crt.sh and Certstream to |   detect phishing domains, lookalike certificates, and unauthorized certificate issuance |   targeting your organization. | domain: cybersecurity | subdomain: threat-intelligence | tags: | - certificate-transparency | - ct-logs | - phishing | - crt-sh | - certstream | - ssl | - domain-monitoring | - threat-intelligence | version: '1.0' | author: mahipal | li","main","4c6d8d65f3d6096e2fc25b0845e481dda73c2794",".claude\u002Fskills\u002Fcyber-analyzing-certificate-transparency-for-phishing",0,"https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions","Building deterministic AI governance and continuity systems. Workflow architect + visual storyteller","2026-11-14 03:05:17",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":44},[57,60,63],{"tool":58,"command":59},"npx","npx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-analyzing-certificate-transparency-for-phishing",{"tool":61,"command":62},"bunx","bunx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-analyzing-certificate-transparency-for-phishing",{"tool":64,"command":65},"pnpm","pnpm dlx skills add nexuslinkproductions\u002Fyuri-os --skill cyber-analyzing-certificate-transparency-for-phishing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcyber-analyzing-certificate-transparency-for-phishing\u002FSKILL.md",[],[69,78,85,92,99,106],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":77},"01M73K12W8K0GSTB4ABKS8BD7H","executing-plans","Use when you have a written implementation plan to execute in a separate session with review checkpoints","MIT","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexecuting-plans\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":77},"01M73HC2NSXYYN54GBASVG2RDJ","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":77},"01M73HC12557CB08VDEF1YTF3H","triage","Triage issues through a state machine driven by triage roles. Use when user wants to create an issue, triage issues, review incoming bugs or feature requests, prepare issues for an AFK agent, or manage issue workflow.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftriage\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":77},"01M73HBXB8F8ED4KQXVXEWCV8B","trade-edge-audit","The EDGE LENS for trading peers — recalls EVERY factor\u002Findicator running from the live forecast ledger (no enumeration) and renders the whole pile through the edge arsenal off ONE call: multi-horizon scoring (the ladder) + deflated Sharpe (overfit) + Benjamini-Hochberg FDR (multiple-testing across the fleet) + spread-bounce + maker-fee falsification, then ranks only what survives ALL of it. Use when a peer must answer \"does ANY running factor have real, overfit-corrected, multiple-testing-corrected, fee-surviving edge, and at which horizon\" without hand-assembling 6 tools. The trade-engine analog of quantum-hypothesis-simulation.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-edge-audit\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":77},"01M73HBT5ZRCA82SQJ781NWVNQ","trade-decision-sim","The DECISION LENS for trading peers — recalls the CURRENT signal snapshot per market from the live ledger and renders it through the sim arsenal off ONE call: quantum factor-circuit order-optimal sequencing + decision-sim CVaR-robust sizing, sized against the MEASURED per-factor edge (from the edge-audit), correlation-aware. Emits an actionable call per market {side, sizePct, confidence, sequence}. Flat\u002Fzero-size when there is no measured edge after cost — the honest default. Sibling of trade-edge-audit (the EDGE lens); the trade-engine analog of quantum-hypothesis-simulation for a live decision.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftrade-decision-sim\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":73,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":77},"01M73HBN2WTKGN790WYQD6GBM4","to-issues","Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.","https:\u002F\u002Fgithub.com\u002Fnexuslinkproductions\u002Fyuri-os\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fto-issues\u002FSKILL.md",[],[]]