[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73EM796RT3VRRCDCP55TFRE":3,"skill-same:01M73EM796RT3VRRCDCP55TFRE":91},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":56,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M73EM796RT3VRRCDCP55TFRE","performing-ip-reputation-analysis-with-shodan",null,"Analyze IP address reputation using the Shodan API to identify open ports, running services, known vulnerabilities, and hosting context for threat intelligence enrichment and incident triage.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-ip-reputation-analysis-with-shodan\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-ip-reputation-analysis-with-shodan\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: performing-ip-reputation-analysis-with-shodan\ndescription: Analyze IP address reputation using the Shodan API to identify open ports,\n  running services, known vulnerabilities, and hosting context for threat intelligence\n  enrichment and incident triage.\ndomain: cybersecurity\nsubdomain: threat-intelligence\ntags:\n- shodan\n- ip-reputation\n- enrichment\n- threat-intelligence\n- reconnaissance\n- vulnerability\n- api\n- internet-scanning\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- ID.RA-01\n- ID.RA-05\n- DE.CM-01\n- DE.AE-02\nmitre_attack:\n- T1591\n- T1592\n- T1593\n- T1589\n- T1595\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\n---\n# Performing IP Reputation Analysis with Shodan\n\n## Overview\n\nShodan is the world's first search engine for internet-connected devices, continuously scanning the IPv4 and IPv6 address space to catalog open ports, running services, SSL certificates, and known vulnerabilities. This skill covers using the Shodan API and InternetDB free API to enrich IP addresses from security alerts, assess threat levels based on exposed services and vulnerabilities, identify hosting infrastructure patterns, and integrate IP reputation data into SOC triage and threat intelligence workflows.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing ip reputation analysis with shodan\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Python 3.9+ with `shodan` library (`pip install shodan`)\n- Shodan API key (free tier: limited queries; paid plans for higher limits and streaming)\n- Understanding of TCP\u002FUDP ports, common services, and CVE identifiers\n- Familiarity with ASN, CIDR notation, and IP geolocation concepts\n- Network security knowledge for interpreting scan results\n\n## Key Concepts\n\n### Shodan Data Model\n\nEach IP record in Shodan contains: open ports and protocols, banner data (service responses), SSL\u002FTLS certificate details, known CVE vulnerabilities, hostname(s) and reverse DNS, ASN and ISP information, geographic location, operating system fingerprint, and historical scan data showing changes over time.\n\n### InternetDB API\n\nShodan's free InternetDB API (internetdb.shodan.io) provides quick IP lookups without authentication, returning open ports, hostnames, tags, CPEs, and known vulnerabilities. This is useful for high-volume enrichment where the full Shodan API would hit rate limits.\n\n### Reputation Scoring\n\nIP reputation is assessed by combining: number and type of open ports (unusual ports indicate compromise), vulnerable services (unpatched software with known CVEs), hosting type (residential, cloud, VPN\u002Fproxy, bulletproof hosting), historical activity (past associations with malware, scanning, spam), and geographic context (countries known for specific threat activity).\n\n## Workflow\n\n### Step 1: Basic IP Enrichment with Shodan API\n\n```python\nimport shodan\nimport json\nfrom datetime import datetime\n\nclass ShodanEnricher:\n    def __init__(self, api_key):\n        self.api = shodan.Shodan(api_key)\n        self.info = self.api.info()\n        print(f\"[+] Shodan API initialized. Credits: {self.info.get('scan_credits', 0)}\")\n\n    def enrich_ip(self, ip_address):\n        \"\"\"Full enrichment of an IP address via Shodan.\"\"\"\n        try:\n            host = self.api.host(ip_address)\n            enrichment = {\n                \"ip\": ip_address,\n                \"organization\": host.get(\"org\", \"\"),\n                \"asn\": host.get(\"asn\", \"\"),\n                \"isp\": host.get(\"isp\", \"\"),\n                \"country\": host.get(\"country_name\", \"\"),\n                \"country_code\": host.get(\"country_code\", \"\"),\n                \"city\": host.get(\"city\", \"\"),\n                \"latitude\": host.get(\"latitude\"),\n                \"longitude\": host.get(\"longitude\"),\n                \"os\": host.get(\"os\", \"\"),\n                \"ports\": host.get(\"ports\", []),\n                \"hostnames\": host.get(\"hostnames\", []),\n                \"domains\": host.get(\"domains\", []),\n                \"vulns\": host.get(\"vulns\", []),\n                \"tags\": host.get(\"tags\", []),\n                \"last_update\": host.get(\"last_update\", \"\"),\n                \"services\": [],\n            }\n\n            for service in host.get(\"data\", []):\n                svc = {\n                    \"port\": service.get(\"port\", 0),\n                    \"transport\": service.get(\"transport\", \"tcp\"),\n                    \"product\": service.get(\"product\", \"\"),\n                    \"version\": service.get(\"version\", \"\"),\n                    \"module\": service.get(\"_shodan\", {}).get(\"module\", \"\"),\n                    \"banner\": service.get(\"data\", \"\")[:200],\n                }\n                if \"ssl\" in service:\n                    svc[\"ssl_subject\"] = service[\"ssl\"].get(\"cert\", {}).get(\"subject\", {})\n                    svc[\"ssl_issuer\"] = service[\"ssl\"].get(\"cert\", {}).get(\"issuer\", {})\n                    svc[\"ssl_expires\"] = service[\"ssl\"].get(\"cert\", {}).get(\"expires\", \"\")\n                enrichment[\"services\"].append(svc)\n\n            # Calculate reputation score\n            enrichment[\"reputation\"] = self._calculate_reputation(enrichment)\n            print(f\"[+] {ip_address}: {len(enrichment['ports'])} ports, \"\n                  f\"{len(enrichment['vulns'])} vulns, \"\n                  f\"reputation: {enrichment['reputation']['level']}\")\n            return enrichment\n\n        except shodan.APIError as e:\n            print(f\"[-] Shodan error for {ip_address}: {e}\")\n            return None\n\n    def _calculate_reputation(self, data):\n        \"\"\"Calculate IP reputation score based on Shodan data.\"\"\"\n        score = 0\n        factors = []\n\n        # Vulnerability assessment\n        vuln_count = len(data.get(\"vulns\", []))\n        if vuln_count > 10:\n            score += 40\n            factors.append(f\"{vuln_count} known vulnerabilities\")\n        elif vuln_count > 5:\n            score += 25\n            factors.append(f\"{vuln_count} known vulnerabilities\")\n        elif vuln_count > 0:\n            score += 10\n            factors.append(f\"{vuln_count} known vulnerabilities\")\n\n        # Suspicious port analysis\n        suspicious_ports = {4444, 5555, 6666, 8888, 9090, 1234, 31337,\n                           6667, 6697, 8080, 8443, 3128, 1080}\n        open_ports = set(data.get(\"ports\", []))\n        sus_found = open_ports.intersection(suspicious_ports)\n        if sus_found:\n            score += 15\n            factors.append(f\"suspicious ports: {sus_found}\")\n\n        # Tag-based assessment\n        malicious_tags = {\"self-signed\", \"cloud\", \"vpn\", \"proxy\", \"tor\"}\n        tags = set(data.get(\"tags\", []))\n        mal_tags = tags.intersection(malicious_tags)\n        if mal_tags:\n            score += 10\n            factors.append(f\"tags: {mal_tags}\")\n\n        # Too many open ports\n        port_count = len(data.get(\"ports\", []))\n        if port_count > 20:\n            score += 15\n            factors.append(f\"excessive open ports ({port_count})\")\n\n        level = (\n            \"critical\" if score >= 50\n            else \"high\" if score >= 35\n            else \"medium\" if score >= 15\n            else \"low\"\n        )\n\n        return {\"score\": score, \"level\": level, \"factors\": factors}\n\n    def enrich_ip_free(self, ip_address):\n        \"\"\"Quick IP enrichment using free InternetDB API.\"\"\"\n        import requests\n        resp = requests.get(f\"https:\u002F\u002Finternetdb.shodan.io\u002F{ip_address}\", timeout=10)\n        if resp.status_code == 200:\n            data = resp.json()\n            print(f\"[+] InternetDB: {ip_address} -> \"\n                  f\"{len(data.get('ports', []))} ports, \"\n                  f\"{len(data.get('vulns', []))} vulns\")\n            return data\n        return None\n\nenricher = ShodanEnricher(\"YOUR_SHODAN_API_KEY\")\nresult = enricher.enrich_ip(\"8.8.8.8\")\nprint(json.dumps(result, indent=2, default=str))\n```\n\n### Step 2: Batch IP Reputation Check\n\n```python\nimport time\n\ndef batch_ip_reputation(enricher, ip_list, output_file=\"ip_reputation.json\"):\n    \"\"\"Check reputation for a list of IP addresses.\"\"\"\n    results = []\n    for i, ip in enumerate(ip_list):\n        result = enricher.enrich_ip(ip)\n        if result:\n            results.append(result)\n        if (i + 1) % 10 == 0:\n            print(f\"  [{i+1}\u002F{len(ip_list)}] Processed\")\n            time.sleep(1)  # Rate limiting\n\n    # Sort by reputation score (highest risk first)\n    results.sort(key=lambda x: x.get(\"reputation\", {}).get(\"score\", 0), reverse=True)\n\n    with open(output_file, \"w\") as f:\n        json.dump(results, f, indent=2, default=str)\n\n    # Summary\n    levels = {\"critical\": 0, \"high\": 0, \"medium\": 0, \"low\": 0}\n    for r in results:\n        level = r.get(\"reputation\", {}).get(\"level\", \"low\")\n        levels[level] += 1\n\n    print(f\"\\n=== Batch Reputation Summary ===\")\n    print(f\"Total IPs: {len(results)}\")\n    for level, count in levels.items():\n        print(f\"  {level.upper()}: {count}\")\n\n    return results\n\nsuspicious_ips = [\"203.0.113.1\", \"198.51.100.5\", \"192.0.2.100\"]\nresults = batch_ip_reputation(enricher, suspicious_ips)\n```\n\n### Step 3: Infrastructure Correlation\n\n```python\ndef correlate_infrastructure(enricher, ip_address):\n    \"\"\"Find related infrastructure based on shared attributes.\"\"\"\n    host_data = enricher.enrich_ip(ip_address)\n    if not host_data:\n        return {}\n\n    correlations = {\n        \"same_org\": [],\n        \"same_asn\": [],\n        \"shared_ssl\": [],\n    }\n\n    # Search for same organization\n    org = host_data.get(\"organization\", \"\")\n    if org:\n        try:\n            results = enricher.api.search(f'org:\"{org}\"', limit=20)\n            for match in results.get(\"matches\", []):\n                correlations[\"same_org\"].append({\n                    \"ip\": match.get(\"ip_str\", \"\"),\n                    \"port\": match.get(\"port\", 0),\n                    \"product\": match.get(\"product\", \"\"),\n                })\n        except shodan.APIError:\n            pass\n\n    # Search for same SSL certificate\n    for service in host_data.get(\"services\", []):\n        ssl_subject = service.get(\"ssl_subject\", {})\n        if ssl_subject:\n            cn = ssl_subject.get(\"CN\", \"\")\n            if cn:\n                try:\n                    results = enricher.api.search(f'ssl.cert.subject.CN:\"{cn}\"', limit=20)\n                    for match in results.get(\"matches\", []):\n                        correlations[\"shared_ssl\"].append({\n                            \"ip\": match.get(\"ip_str\", \"\"),\n                            \"cn\": cn,\n                        })\n                except shodan.APIError:\n                    pass\n\n    print(f\"[+] Infrastructure correlations for {ip_address}:\")\n    print(f\"  Same org: {len(correlations['same_org'])} hosts\")\n    print(f\"  Shared SSL: {len(correlations['shared_ssl'])} hosts\")\n    return correlations\n```\n\n## Validation Criteria\n\n- Shodan API queried successfully with proper authentication\n- IP enrichment returns ports, services, vulnerabilities, and geolocation\n- Reputation scoring classifies IPs by threat level\n- Batch enrichment handles rate limiting correctly\n- Infrastructure correlation identifies related hosts\n- InternetDB free API used for high-volume lookups\n\n## References\n\n- [Shodan Developer API](https:\u002F\u002Fdeveloper.shodan.io\u002Fapi)\n- [Shodan InternetDB API](https:\u002F\u002Finternetdb.shodan.io\u002F)\n- [Shodan Python Library](https:\u002F\u002Fgithub.com\u002Fachillean\u002Fshodan-python)\n- [Query.ai: Leveraging Shodan for Security Research](https:\u002F\u002Fwww.query.ai\u002Fresources\u002Fblogs\u002Fleveraging-shodan-for-security-research\u002F)\n- [Torq: Shodan IP Enrichment Workflow](https:\u002F\u002Fkb.torq.io\u002Fen\u002Farticles\u002F9350284-shodan-ip-address-enrichment-with-cache-workflow-template)\n- [Recorded Future: Shodan Integration](https:\u002F\u002Fsupport.recordedfuture.com\u002Fhc\u002Fen-us\u002Farticles\u002F115001403928-Shodan)\n","# Performing IP Reputation Analysis with Shodan\n\n## Overview\n\nShodan is the world's first search engine for internet-connected devices, continuously scanning the IPv4 and IPv6 address space to catalog open ports, running services, SSL certificates, and known vulnerabilities. This skill covers using the Shodan API and InternetDB free API to enrich IP addresses from security alerts, assess threat levels based on exposed services and vulnerabilities, identify hosting infrastructure patterns, and integrate IP reputation data into SOC triage and threat intelligence workflows.\n\n\n## When to Use\n\n- When conducting security assessments that involve performing ip reputation analysis with shodan\n- When following incident response procedures for related security events\n- When performing scheduled security testing or auditing activities\n- When validating security controls through hands-on testing\n\n## Prerequisites\n\n- Python 3.9+ with `shodan` library (`pip install shodan`)\n- Shodan API key (free tier: limited queries; paid plans for higher limits and streaming)\n- Understanding of TCP\u002FUDP ports, common services, and CVE identifiers\n- Familiarity with ASN, CIDR notation, and IP geolocation concepts\n- Network security knowledge for interpreting scan results\n\n## Key Concepts\n\n### Shodan Data Model\n\nEach IP record in Shodan contains: open ports and protocols, banner data (service responses), SSL\u002FTLS certificate details, known CVE vulnerabilities, hostname(s) and reverse DNS, ASN and ISP information, geographic location, operating system fingerprint, and historical scan data showing changes over time.\n\n### InternetDB API\n\nShodan's free InternetDB API (internetdb.shodan.io) provides quick IP lookups without authentication, returning open ports, hostnames, tags, CPEs, and known vulnerabilities. This is useful for high-volume enrichment where the full Shodan API would hit rate limits.\n\n### Reputation Scoring\n\nIP reputation is assessed by combining: number and type of open ports (unusual ports indicate compromise), vulnerable services (unpatched software with known CVEs), hosting type (residential, cloud, VPN\u002Fproxy, bulletproof hosting), historical activity (past associations with malware, scanning, spam), and geographic context (countries known for specific threat activity).\n\n## Workflow\n\n### Step 1: Basic IP Enrichment with Shodan API\n\n```python\nimport shodan\nimport json\nfrom datetime import datetime\n\nclass ShodanEnricher:\n    def __init__(self, api_key):\n        self.api = shodan.Shodan(api_key)\n        self.info = self.api.info()\n        print(f\"[+] Shodan API initialized. Credits: {self.info.get('scan_credits', 0)}\")\n\n    def enrich_ip(self, ip_address):\n        \"\"\"Full enrichment of an IP address via Shodan.\"\"\"\n        try:\n            host = self.api.host(ip_address)\n            enrichment = {\n                \"ip\": ip_address,\n                \"organization\": host.get(\"org\", \"\"),\n                \"asn\": host.get(\"asn\", \"\"),\n                \"isp\": host.get(\"isp\", \"\"),\n                \"country\": host.get(\"country_name\", \"\"),\n                \"country_code\": host.get(\"country_code\", \"\"),\n                \"city\": host.get(\"city\", \"\"),\n                \"latitude\": host.get(\"latitude\"),\n                \"longitude\": host.get(\"longitude\"),\n                \"os\": host.get(\"os\", \"\"),\n                \"ports\": host.get(\"ports\", []),\n                \"hostnames\": host.get(\"hostnames\", []),\n                \"domains\": host.get(\"domains\", []),\n                \"vulns\": host.get(\"vulns\", []),\n                \"tags\": host.get(\"tags\", []),\n                \"last_update\": host.get(\"last_update\", \"\"),\n                \"services\": [],\n            }\n\n            for service in host.get(\"data\", []):\n                svc = {\n                    \"port\": service.get(\"port\", 0),\n                    \"transport\": service.get(\"transport\", \"tcp\"),\n                    \"product\": service.get(\"product\", \"\"),\n                    \"version\": service.get(\"version\", \"\"),\n                    \"module\": service.get(\"_shodan\", {}).get(\"module\", \"\"),\n                    \"banner\": service.get(\"data\", \"\")[:200],\n                }\n                if \"ssl\" in service:\n                    svc[\"ssl_subject\"] = service[\"ssl\"].get(\"cert\", {}).get(\"subject\", {})\n                    svc[\"ssl_issuer\"] = service[\"ssl\"].get(\"cert\", {}).get(\"issuer\", {})\n                    svc[\"ssl_expires\"] = service[\"ssl\"].get(\"cert\", {}).get(\"expires\", \"\")\n                enrichment[\"services\"].append(svc)\n\n            # Calculate reputation score\n            enrichment[\"reputation\"] = self._calculate_reputation(enrichment)\n            print(f\"[+] {ip_address}: {len(enrichment['ports'])} ports, \"\n                  f\"{len(enrichment['vulns'])} vulns, \"\n                  f\"reputation: {enrichment['reputation']['level']}\")\n            return enrichment\n\n        except shodan.APIError as e:\n            print(f\"[-] Shodan error for {ip_address}: {e}\")\n            return None\n\n    def _calculate_reputation(self, data):\n        \"\"\"Calculate IP reputation score based on Shodan data.\"\"\"\n        score = 0\n        factors = []\n\n        # Vulnerability assessment\n        vuln_count = len(data.get(\"vulns\", []))\n        if vuln_count > 10:\n            score += 40\n            factors.append(f\"{vuln_count} known vulnerabilities\")\n        elif vuln_count > 5:\n            score += 25\n            factors.append(f\"{vuln_count} known vulnerabilities\")\n        elif vuln_count > 0:\n            score += 10\n            factors.append(f\"{vuln_count} known vulnerabilities\")\n\n        # Suspicious port analysis\n        suspicious_ports = {4444, 5555, 6666, 8888, 9090, 1234, 31337,\n                           6667, 6697, 8080, 8443, 3128, 1080}\n        open_ports = set(data.get(\"ports\", []))\n        sus_found = open_ports.intersection(suspicious_ports)\n        if sus_found:\n            score += 15\n            factors.append(f\"suspicious ports: {sus_found}\")\n\n        # Tag-based assessment\n        malicious_tags = {\"self-signed\", \"cloud\", \"vpn\", \"proxy\", \"tor\"}\n        tags = set(data.get(\"tags\", []))\n        mal_tags = tags.intersection(malicious_tags)\n        if mal_tags:\n            score += 10\n            factors.append(f\"tags: {mal_tags}\")\n\n        # Too many open ports\n        port_count = len(data.get(\"ports\", []))\n        if port_count > 20:\n            score += 15\n            factors.append(f\"excessive open ports ({port_count})\")\n\n        level = (\n            \"critical\" if score >= 50\n            else \"high\" if score >= 35\n            else \"medium\" if score >= 15\n            else \"low\"\n        )\n\n        return {\"score\": score, \"level\": level, \"factors\": factors}\n\n    def enrich_ip_free(self, ip_address):\n        \"\"\"Quick IP enrichment using free InternetDB API.\"\"\"\n        import requests\n        resp = requests.get(f\"https:\u002F\u002Finternetdb.shodan.io\u002F{ip_address}\", timeout=10)\n        if resp.status_code == 200:\n            data = resp.json()\n            print(f\"[+] InternetDB: {ip_address} -> \"\n                  f\"{len(data.get('ports', []))} ports, \"\n                  f\"{len(data.get('vulns', []))} vulns\")\n            return data\n        return None\n\nenricher = ShodanEnricher(\"YOUR_SHODAN_API_KEY\")\nresult = enricher.enrich_ip(\"8.8.8.8\")\nprint(json.dumps(result, indent=2, default=str))\n```\n\n### Step 2: Batch IP Reputation Check\n\n```python\nimport time\n\ndef batch_ip_reputation(enricher, ip_list, output_file=\"ip_reputation.json\"):\n    \"\"\"Check reputation for a list of IP addresses.\"\"\"\n    results = []\n    for i, ip in enumerate(ip_list):\n        result = enricher.enrich_ip(ip)\n        if result:\n            results.append(result)\n        if (i + 1) % 10 == 0:\n            print(f\"  [{i+1}\u002F{len(ip_list)}] Processed\")\n            time.sleep(1)  # Rate limiting\n\n    # Sort by reputation score (highest risk first)\n    results.sort(key=lambda x: x.get(\"reputation\", {}).get(\"score\", 0), reverse=True)\n\n    with open(output_file, \"w\") as f:\n        json.dump(results, f, indent=2, default=str)\n\n    # Summary\n    levels = {\"critical\": 0, \"high\": 0, \"medium\": 0, \"low\": 0}\n    for r in results:\n        level = r.get(\"reputation\", {}).get(\"level\", \"low\")\n        levels[level] += 1\n\n    print(f\"\\n=== Batch Reputation Summary ===\")\n    print(f\"Total IPs: {len(results)}\")\n    for level, count in levels.items():\n        print(f\"  {level.upper()}: {count}\")\n\n    return results\n\nsuspicious_ips = [\"203.0.113.1\", \"198.51.100.5\", \"192.0.2.100\"]\nresults = batch_ip_reputation(enricher, suspicious_ips)\n```\n\n### Step 3: Infrastructure Correlation\n\n```python\ndef correlate_infrastructure(enricher, ip_address):\n    \"\"\"Find related infrastructure based on shared attributes.\"\"\"\n    host_data = enricher.enrich_ip(ip_address)\n    if not host_data:\n        return {}\n\n    correlations = {\n        \"same_org\": [],\n        \"same_asn\": [],\n        \"shared_ssl\": [],\n    }\n\n    # Search for same organization\n    org = host_data.get(\"organization\", \"\")\n    if org:\n        try:\n            results = enricher.api.search(f'org:\"{org}\"', limit=20)\n            for match in results.get(\"matches\", []):\n                correlations[\"same_org\"].append({\n                    \"ip\": match.get(\"ip_str\", \"\"),\n                    \"port\": match.get(\"port\", 0),\n                    \"product\": match.get(\"product\", \"\"),\n                })\n        except shodan.APIError:\n            pass\n\n    # Search for same SSL certificate\n    for service in host_data.get(\"services\", []):\n        ssl_subject = service.get(\"ssl_subject\", {})\n        if ssl_subject:\n            cn = ssl_subject.get(\"CN\", \"\")\n            if cn:\n                try:\n                    results = enricher.api.search(f'ssl.cert.subject.CN:\"{cn}\"', limit=20)\n                    for match in results.get(\"matches\", []):\n                        correlations[\"shared_ssl\"].append({\n                            \"ip\": match.get(\"ip_str\", \"\"),\n                            \"cn\": cn,\n                        })\n                except shodan.APIError:\n                    pass\n\n    print(f\"[+] Infrastructure correlations for {ip_address}:\")\n    print(f\"  Same org: {len(correlations['same_org'])} hosts\")\n    print(f\"  Shared SSL: {len(correlations['shared_ssl'])} hosts\")\n    return correlations\n```\n\n## Validation Criteria\n\n- Shodan API queried successfully with proper authentication\n- IP enrichment returns ports, services, vulnerabilities, and geolocation\n- Reputation scoring classifies IPs by threat level\n- Batch enrichment handles rate limiting correctly\n- Infrastructure correlation identifies related hosts\n- InternetDB free API used for high-volume lookups\n\n## References\n\n- [Shodan Developer API](https:\u002F\u002Fdeveloper.shodan.io\u002Fapi)\n- [Shodan InternetDB API](https:\u002F\u002Finternetdb.shodan.io\u002F)\n- [Shodan Python Library](https:\u002F\u002Fgithub.com\u002Fachillean\u002Fshodan-python)\n- [Query.ai: Leveraging Shodan for Security Research](https:\u002F\u002Fwww.query.ai\u002Fresources\u002Fblogs\u002Fleveraging-shodan-for-security-research\u002F)\n- [Torq: Shodan IP Enrichment Workflow](https:\u002F\u002Fkb.torq.io\u002Fen\u002Farticles\u002F9350284-shodan-ip-address-enrichment-with-cache-workflow-template)\n- [Recorded Future: Shodan Integration](https:\u002F\u002Fsupport.recordedfuture.com\u002Fhc\u002Fen-us\u002Farticles\u002F115001403928-Shodan)\n",{"name":5,"note":25,"tags":26,"author":35,"domain":36,"source":37,"license":15,"version":38,"nist_csf":39,"subdomain":30,"description":7,"mitre_attack":44,"source_commit":50},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31,32,33,34],"shodan","ip-reputation","enrichment","threat-intelligence","reconnaissance","vulnerability","api","internet-scanning","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0",[40,41,42,43],"ID.RA-01","ID.RA-05","DE.CM-01","DE.AE-02",[45,46,47,48,49],"T1591","T1592","T1593","T1589","T1595","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fperforming-ip-reputation-analysis-with-shodan",1,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-11 23:56:26",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill performing-ip-reputation-analysis-with-shodan",{"tool":67,"command":68},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill performing-ip-reputation-analysis-with-shodan",{"tool":70,"command":71},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill performing-ip-reputation-analysis-with-shodan","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-ip-reputation-analysis-with-shodan\u002FSKILL.md",true,[75,79,85],{"path":76,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fapi-reference.md","REFERENCE","参考文档",1157,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-ip-reputation-analysis-with-shodan\u002Freferences\u002Fapi-reference.md",{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"scripts\u002Fagent.py","SCRIPT","脚本",4260,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fperforming-ip-reputation-analysis-with-shodan\u002Fscripts\u002Fagent.py",[92,100,107,115,123,131],{"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":96,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":111,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":119,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":127,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]