[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ESYV0ZK4H0BQK9KYCPQ2NA":3,"skill-same:01M6ESYV0ZK4H0BQK9KYCPQ2NA":109},{"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":26,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":70,"commitSha":71,"skillDirectory":72,"forksCount":14,"repositoryHtmlUrl":73,"repositoryHomepageUrl":74,"ownerHtmlUrl":75,"ownerBlogUrl":6,"ownerDescription":76,"updatedAt":77,"install":78,"resources":91},"01M6ESYV0ZK4H0BQK9KYCPQ2NA","building-threat-feed-aggregation-with-misp",null,"Deploy MISP (Malware Information Sharing Platform) to aggregate, correlate, and distribute threat intelligence feeds from multiple sources for centralized IOC management and automated SIEM integration.","henriquescastilho\u002Fmy-claude","henriquescastilho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153296945?v=4","01M6ESH7EXPXTH9CVQ4K16SRG8","Henrique Scheer","01M6ESH7JHEK2PTNNH4HEH787Z",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbuilding-threat-feed-aggregation-with-misp\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"threat","with","building threat feed aggregation with misp","aggregation","MISP","ioc","malware","threat-intelligence","threat intelligence","feeds","cybersecurity","cm","intelligence","platform","distribute","id","de","sources","information","siem","2026-11-10 10:12:30",false,"---\nname: building-threat-feed-aggregation-with-misp\ndescription: Deploy MISP (Malware Information Sharing Platform) to aggregate, correlate,\n  and distribute threat intelligence feeds from multiple sources for centralized IOC\n  management and automated SIEM integration.\ndomain: cybersecurity\nsubdomain: threat-intelligence\ntags:\n- misp\n- threat-feed\n- aggregation\n- indicator\n- sharing\n- correlation\n- siem-integration\n- threat-intelligence\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- T1071\n- T1105\n- T1588.001\n---\n# Building Threat Feed Aggregation with MISP\n\n## Overview\n\nMISP is the leading open-source threat intelligence platform for collecting, storing, distributing, and sharing cybersecurity indicators and threat intelligence. It aggregates feeds from OSINT sources, commercial providers, and sharing communities into a unified platform with automatic correlation, STIX\u002FTAXII export, and direct integration with SIEMs and security tools. This skill covers deploying MISP via Docker, configuring feeds from sources like abuse.ch, AlienVault OTX, and CIRCL, setting up automated feed synchronization, and integrating with Splunk, Elasticsearch, and SOAR platforms.\n\n\n## When to Use\n\n- When deploying or configuring building threat feed aggregation with misp capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Docker and Docker Compose for deployment\n- Python 3.9+ with `pymisp` library for API interaction\n- Linux server with 8GB+ RAM for production deployment\n- Understanding of IOC types and threat intelligence lifecycle\n- Network access to external feed URLs\n\n## Key Concepts\n\n### MISP Architecture\n\nMISP stores threat intelligence as Events containing Attributes (IOCs) organized by type and category. Events can have Tags (MITRE ATT&CK, TLP marking, sector tags), Galaxies (threat actor profiles, malware families, attack patterns), and Objects (structured groupings of related attributes). Events are correlated automatically across the instance.\n\n### Feed Types\n\nMISP supports three feed formats: MISP format (native JSON events), CSV (comma-separated IOCs), and freetext (unstructured text with automatic IOC extraction). Feeds can be remote (fetched from URLs) or local (uploaded files). MISP ships with 80+ default OSINT feeds including abuse.ch URLhaus, Botvrij, CIRCL OSINT, and malware traffic analysis.\n\n### Sharing and Synchronization\n\nMISP instances can synchronize with other MISP instances via push\u002Fpull mechanisms. Sharing groups control distribution (organization only, this community, connected communities, all communities). The TAXII server module enables integration with STIX\u002FTAXII consumers.\n\n## Workflow\n\n### Step 1: Deploy MISP with Docker\n\n```yaml\n# docker-compose.yml for MISP deployment\nversion: '3.8'\nservices:\n  misp:\n    image: coolacid\u002Fmisp-docker:core-latest\n    container_name: misp\n    restart: unless-stopped\n    ports:\n      - \"443:443\"\n      - \"80:80\"\n    environment:\n      - MYSQL_HOST=misp-db\n      - MYSQL_DATABASE=misp\n      - MYSQL_USER=misp\n      - MYSQL_PASSWORD=misp_db_password_change_me\n      - MISP_ADMIN_EMAIL=admin@organization.com\n      - MISP_ADMIN_PASSPHRASE=admin_password_change_me\n      - MISP_BASEURL=https:\u002F\u002Fmisp.organization.com\n      - POSTFIX_RELAY_HOST=smtp.organization.com\n      - TIMEZONE=UTC\n    volumes:\n      - misp-data:\u002Fvar\u002Fwww\u002FMISP\u002Fapp\u002Ffiles\n      - misp-config:\u002Fvar\u002Fwww\u002FMISP\u002Fapp\u002FConfig\n    depends_on:\n      - misp-db\n      - misp-redis\n\n  misp-db:\n    image: mysql:8.0\n    container_name: misp-db\n    restart: unless-stopped\n    environment:\n      - MYSQL_DATABASE=misp\n      - MYSQL_USER=misp\n      - MYSQL_PASSWORD=misp_db_password_change_me\n      - MYSQL_ROOT_PASSWORD=root_password_change_me\n    volumes:\n      - misp-db-data:\u002Fvar\u002Flib\u002Fmysql\n\n  misp-redis:\n    image: redis:7\n    container_name: misp-redis\n    restart: unless-stopped\n\nvolumes:\n  misp-data:\n  misp-config:\n  misp-db-data:\n```\n\n### Step 2: Configure Feeds via PyMISP API\n\n```python\nfrom pymisp import PyMISP, MISPFeed\nimport json\n\nclass MISPFeedManager:\n    def __init__(self, misp_url, misp_key, verify_ssl=False):\n        self.misp = PyMISP(misp_url, misp_key, verify_ssl)\n        print(f\"[+] Connected to MISP: {misp_url}\")\n\n    def list_feeds(self):\n        \"\"\"List all configured feeds.\"\"\"\n        feeds = self.misp.feeds()\n        enabled = [f for f in feeds if f.get(\"Feed\", {}).get(\"enabled\")]\n        disabled = [f for f in feeds if not f.get(\"Feed\", {}).get(\"enabled\")]\n        print(f\"[+] Feeds: {len(enabled)} enabled, {len(disabled)} disabled\")\n        return feeds\n\n    def enable_default_feeds(self):\n        \"\"\"Enable recommended default OSINT feeds.\"\"\"\n        recommended_feeds = [\n            \"CIRCL OSINT Feed\",\n            \"Botvrij.eu - Indicators of Compromise\",\n            \"abuse.ch URLhaus Host file\",\n            \"abuse.ch Feodo Tracker\",\n            \"abuse.ch SSL Blacklist\",\n            \"malwaredomainlist\",\n            \"CyberCure - IP Feed\",\n        ]\n\n        feeds = self.misp.feeds()\n        enabled_count = 0\n        for feed in feeds:\n            feed_data = feed.get(\"Feed\", {})\n            if feed_data.get(\"name\") in recommended_feeds:\n                if not feed_data.get(\"enabled\"):\n                    self.misp.enable_feed(feed_data[\"id\"])\n                    self.misp.enable_feed_cache(feed_data[\"id\"])\n                    enabled_count += 1\n                    print(f\"  [+] Enabled: {feed_data['name']}\")\n\n        print(f\"[+] Enabled {enabled_count} feeds\")\n\n    def add_custom_feed(self, name, url, provider, feed_format=\"csv\",\n                        input_source=\"network\", enabled=True):\n        \"\"\"Add a custom threat intelligence feed.\"\"\"\n        feed = MISPFeed()\n        feed.name = name\n        feed.provider = provider\n        feed.url = url\n        feed.source_format = feed_format\n        feed.input_source = input_source\n        feed.enabled = enabled\n        feed.caching_enabled = True\n        feed.publish = False\n        feed.distribution = \"3\"  # All communities\n\n        result = self.misp.add_feed(feed)\n        if \"Feed\" in result:\n            feed_id = result[\"Feed\"][\"id\"]\n            print(f\"[+] Added feed: {name} (ID: {feed_id})\")\n            return feed_id\n        else:\n            print(f\"[-] Error adding feed: {result}\")\n            return None\n\n    def fetch_all_feeds(self):\n        \"\"\"Trigger fetch for all enabled feeds.\"\"\"\n        feeds = self.misp.feeds()\n        for feed in feeds:\n            feed_data = feed.get(\"Feed\", {})\n            if feed_data.get(\"enabled\"):\n                self.misp.fetch_feed(feed_data[\"id\"])\n                print(f\"  [*] Fetching: {feed_data['name']}\")\n        print(\"[+] Feed fetch triggered for all enabled feeds\")\n\nmanager = MISPFeedManager(\n    \"https:\u002F\u002Fmisp.organization.com\",\n    \"YOUR_MISP_API_KEY\",\n)\nmanager.enable_default_feeds()\nmanager.add_custom_feed(\n    name=\"Abuse.ch MalwareBazaar Recent\",\n    url=\"https:\u002F\u002Fbazaar.abuse.ch\u002Fexport\u002Fcsv\u002Frecent\u002F\",\n    provider=\"abuse.ch\",\n    feed_format=\"csv\",\n)\nmanager.fetch_all_feeds()\n```\n\n### Step 3: Search and Correlate Indicators\n\n```python\ndef search_indicators(misp, value=None, type_attribute=None, tags=None, last_days=30):\n    \"\"\"Search MISP for indicators with correlation.\"\"\"\n    from datetime import datetime, timedelta\n    date_from = (datetime.now() - timedelta(days=last_days)).strftime(\"%Y-%m-%d\")\n\n    search_params = {\n        \"date_from\": date_from,\n        \"published\": True,\n        \"enforceWarninglist\": True,\n    }\n    if value:\n        search_params[\"value\"] = value\n    if type_attribute:\n        search_params[\"type_attribute\"] = type_attribute\n    if tags:\n        search_params[\"tags\"] = tags\n\n    results = misp.search(\"attributes\", **search_params)\n    attributes = results.get(\"Attribute\", [])\n    print(f\"[+] Search returned {len(attributes)} attributes\")\n\n    # Group by event for context\n    events = {}\n    for attr in attributes:\n        event_id = attr.get(\"event_id\", \"\")\n        if event_id not in events:\n            events[event_id] = {\"attributes\": [], \"tags\": set()}\n        events[event_id][\"attributes\"].append({\n            \"type\": attr.get(\"type\", \"\"),\n            \"value\": attr.get(\"value\", \"\"),\n            \"category\": attr.get(\"category\", \"\"),\n            \"timestamp\": attr.get(\"timestamp\", \"\"),\n        })\n        for tag in attr.get(\"Tag\", []):\n            events[event_id][\"tags\"].add(tag.get(\"name\", \"\"))\n\n    return {\"attributes\": attributes, \"events\": events}\n\n# Search for specific IOC\nmisp = manager.misp\nresults = search_indicators(misp, value=\"203.0.113.1\")\nresults_by_type = search_indicators(misp, type_attribute=\"ip-dst\", last_days=7)\nresults_by_tag = search_indicators(misp, tags=[\"tlp:white\", \"type:OSINT\"])\n```\n\n### Step 4: Export to SIEM (Splunk \u002F Elasticsearch)\n\n```python\nimport requests\nfrom datetime import datetime, timedelta\n\nclass MISPSIEMExporter:\n    def __init__(self, misp_client):\n        self.misp = misp_client\n\n    def export_to_splunk(self, splunk_url, hec_token, days=7):\n        \"\"\"Export recent MISP indicators to Splunk via HEC.\"\"\"\n        date_from = (datetime.now() - timedelta(days=days)).strftime(\"%Y-%m-%d\")\n        results = self.misp.search(\"attributes\", date_from=date_from,\n                                    published=True, enforceWarninglist=True)\n        attributes = results.get(\"Attribute\", [])\n\n        headers = {\"Authorization\": f\"Splunk {hec_token}\"}\n        exported = 0\n        for attr in attributes:\n            event = {\n                \"event\": {\n                    \"ioc_type\": attr.get(\"type\", \"\"),\n                    \"ioc_value\": attr.get(\"value\", \"\"),\n                    \"category\": attr.get(\"category\", \"\"),\n                    \"event_id\": attr.get(\"event_id\", \"\"),\n                    \"timestamp\": attr.get(\"timestamp\", \"\"),\n                    \"tags\": [t.get(\"name\", \"\") for t in attr.get(\"Tag\", [])],\n                },\n                \"sourcetype\": \"misp:attribute\",\n                \"source\": \"misp\",\n                \"index\": \"threat_intel\",\n            }\n            resp = requests.post(\n                f\"{splunk_url}\u002Fservices\u002Fcollector\u002Fevent\",\n                headers=headers, json=event,\n                verify=not os.environ.get(\"SKIP_TLS_VERIFY\", \"\").lower() == \"true\",  # Set SKIP_TLS_VERIFY=true for self-signed certs in lab environments\n            )\n            if resp.status_code == 200:\n                exported += 1\n\n        print(f\"[+] Exported {exported}\u002F{len(attributes)} indicators to Splunk\")\n\n    def export_ioc_list(self, output_file, ioc_types=None, days=30):\n        \"\"\"Export flat IOC list for firewall\u002Fproxy blocklists.\"\"\"\n        ioc_types = ioc_types or [\"ip-dst\", \"domain\", \"hostname\", \"url\"]\n        date_from = (datetime.now() - timedelta(days=days)).strftime(\"%Y-%m-%d\")\n\n        all_iocs = []\n        for ioc_type in ioc_types:\n            results = self.misp.search(\n                \"attributes\", type_attribute=ioc_type,\n                date_from=date_from, published=True,\n                enforceWarninglist=True,\n            )\n            for attr in results.get(\"Attribute\", []):\n                all_iocs.append(attr.get(\"value\", \"\"))\n\n        unique_iocs = sorted(set(all_iocs))\n        with open(output_file, \"w\") as f:\n            for ioc in unique_iocs:\n                f.write(f\"{ioc}\\n\")\n\n        print(f\"[+] Exported {len(unique_iocs)} unique IOCs to {output_file}\")\n\nexporter = MISPSIEMExporter(misp)\nexporter.export_ioc_list(\"blocklist_ips.txt\", ioc_types=[\"ip-dst\"], days=7)\n```\n\n## Validation Criteria\n\n- MISP deployed and accessible via web interface and API\n- Default OSINT feeds enabled and fetching data\n- Custom feeds added and ingesting indicators\n- Indicators searchable with correlation across events\n- IOCs exported to SIEM (Splunk\u002FElasticsearch) successfully\n- Blocklists generated for firewall\u002Fproxy integration\n\n## References\n\n- [MISP Project](https:\u002F\u002Fwww.misp-project.org\u002F)\n- [MISP GitHub Repository](https:\u002F\u002Fgithub.com\u002FMISP\u002FMISP)\n- [MISP Default Feeds](https:\u002F\u002Fwww.misp-project.org\u002Ffeeds\u002F)\n- [PyMISP Documentation](https:\u002F\u002Fpymisp.readthedocs.io\u002F)\n- [Kraven Security: MISP Using Feeds](https:\u002F\u002Fkravensecurity.com\u002Fthreat-intelligence-with-misp-part-4-using-feeds\u002F)\n- [Cosive: What is MISP](https:\u002F\u002Fwww.cosive.com\u002Fblog\u002Fwhat-is-misp-the-ultimate-introduction)\n","# Building Threat Feed Aggregation with MISP\n\n## Overview\n\nMISP is the leading open-source threat intelligence platform for collecting, storing, distributing, and sharing cybersecurity indicators and threat intelligence. It aggregates feeds from OSINT sources, commercial providers, and sharing communities into a unified platform with automatic correlation, STIX\u002FTAXII export, and direct integration with SIEMs and security tools. This skill covers deploying MISP via Docker, configuring feeds from sources like abuse.ch, AlienVault OTX, and CIRCL, setting up automated feed synchronization, and integrating with Splunk, Elasticsearch, and SOAR platforms.\n\n\n## When to Use\n\n- When deploying or configuring building threat feed aggregation with misp capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Docker and Docker Compose for deployment\n- Python 3.9+ with `pymisp` library for API interaction\n- Linux server with 8GB+ RAM for production deployment\n- Understanding of IOC types and threat intelligence lifecycle\n- Network access to external feed URLs\n\n## Key Concepts\n\n### MISP Architecture\n\nMISP stores threat intelligence as Events containing Attributes (IOCs) organized by type and category. Events can have Tags (MITRE ATT&CK, TLP marking, sector tags), Galaxies (threat actor profiles, malware families, attack patterns), and Objects (structured groupings of related attributes). Events are correlated automatically across the instance.\n\n### Feed Types\n\nMISP supports three feed formats: MISP format (native JSON events), CSV (comma-separated IOCs), and freetext (unstructured text with automatic IOC extraction). Feeds can be remote (fetched from URLs) or local (uploaded files). MISP ships with 80+ default OSINT feeds including abuse.ch URLhaus, Botvrij, CIRCL OSINT, and malware traffic analysis.\n\n### Sharing and Synchronization\n\nMISP instances can synchronize with other MISP instances via push\u002Fpull mechanisms. Sharing groups control distribution (organization only, this community, connected communities, all communities). The TAXII server module enables integration with STIX\u002FTAXII consumers.\n\n## Workflow\n\n### Step 1: Deploy MISP with Docker\n\n```yaml\n# docker-compose.yml for MISP deployment\nversion: '3.8'\nservices:\n  misp:\n    image: coolacid\u002Fmisp-docker:core-latest\n    container_name: misp\n    restart: unless-stopped\n    ports:\n      - \"443:443\"\n      - \"80:80\"\n    environment:\n      - MYSQL_HOST=misp-db\n      - MYSQL_DATABASE=misp\n      - MYSQL_USER=misp\n      - MYSQL_PASSWORD=misp_db_password_change_me\n      - MISP_ADMIN_EMAIL=admin@organization.com\n      - MISP_ADMIN_PASSPHRASE=admin_password_change_me\n      - MISP_BASEURL=https:\u002F\u002Fmisp.organization.com\n      - POSTFIX_RELAY_HOST=smtp.organization.com\n      - TIMEZONE=UTC\n    volumes:\n      - misp-data:\u002Fvar\u002Fwww\u002FMISP\u002Fapp\u002Ffiles\n      - misp-config:\u002Fvar\u002Fwww\u002FMISP\u002Fapp\u002FConfig\n    depends_on:\n      - misp-db\n      - misp-redis\n\n  misp-db:\n    image: mysql:8.0\n    container_name: misp-db\n    restart: unless-stopped\n    environment:\n      - MYSQL_DATABASE=misp\n      - MYSQL_USER=misp\n      - MYSQL_PASSWORD=misp_db_password_change_me\n      - MYSQL_ROOT_PASSWORD=root_password_change_me\n    volumes:\n      - misp-db-data:\u002Fvar\u002Flib\u002Fmysql\n\n  misp-redis:\n    image: redis:7\n    container_name: misp-redis\n    restart: unless-stopped\n\nvolumes:\n  misp-data:\n  misp-config:\n  misp-db-data:\n```\n\n### Step 2: Configure Feeds via PyMISP API\n\n```python\nfrom pymisp import PyMISP, MISPFeed\nimport json\n\nclass MISPFeedManager:\n    def __init__(self, misp_url, misp_key, verify_ssl=False):\n        self.misp = PyMISP(misp_url, misp_key, verify_ssl)\n        print(f\"[+] Connected to MISP: {misp_url}\")\n\n    def list_feeds(self):\n        \"\"\"List all configured feeds.\"\"\"\n        feeds = self.misp.feeds()\n        enabled = [f for f in feeds if f.get(\"Feed\", {}).get(\"enabled\")]\n        disabled = [f for f in feeds if not f.get(\"Feed\", {}).get(\"enabled\")]\n        print(f\"[+] Feeds: {len(enabled)} enabled, {len(disabled)} disabled\")\n        return feeds\n\n    def enable_default_feeds(self):\n        \"\"\"Enable recommended default OSINT feeds.\"\"\"\n        recommended_feeds = [\n            \"CIRCL OSINT Feed\",\n            \"Botvrij.eu - Indicators of Compromise\",\n            \"abuse.ch URLhaus Host file\",\n            \"abuse.ch Feodo Tracker\",\n            \"abuse.ch SSL Blacklist\",\n            \"malwaredomainlist\",\n            \"CyberCure - IP Feed\",\n        ]\n\n        feeds = self.misp.feeds()\n        enabled_count = 0\n        for feed in feeds:\n            feed_data = feed.get(\"Feed\", {})\n            if feed_data.get(\"name\") in recommended_feeds:\n                if not feed_data.get(\"enabled\"):\n                    self.misp.enable_feed(feed_data[\"id\"])\n                    self.misp.enable_feed_cache(feed_data[\"id\"])\n                    enabled_count += 1\n                    print(f\"  [+] Enabled: {feed_data['name']}\")\n\n        print(f\"[+] Enabled {enabled_count} feeds\")\n\n    def add_custom_feed(self, name, url, provider, feed_format=\"csv\",\n                        input_source=\"network\", enabled=True):\n        \"\"\"Add a custom threat intelligence feed.\"\"\"\n        feed = MISPFeed()\n        feed.name = name\n        feed.provider = provider\n        feed.url = url\n        feed.source_format = feed_format\n        feed.input_source = input_source\n        feed.enabled = enabled\n        feed.caching_enabled = True\n        feed.publish = False\n        feed.distribution = \"3\"  # All communities\n\n        result = self.misp.add_feed(feed)\n        if \"Feed\" in result:\n            feed_id = result[\"Feed\"][\"id\"]\n            print(f\"[+] Added feed: {name} (ID: {feed_id})\")\n            return feed_id\n        else:\n            print(f\"[-] Error adding feed: {result}\")\n            return None\n\n    def fetch_all_feeds(self):\n        \"\"\"Trigger fetch for all enabled feeds.\"\"\"\n        feeds = self.misp.feeds()\n        for feed in feeds:\n            feed_data = feed.get(\"Feed\", {})\n            if feed_data.get(\"enabled\"):\n                self.misp.fetch_feed(feed_data[\"id\"])\n                print(f\"  [*] Fetching: {feed_data['name']}\")\n        print(\"[+] Feed fetch triggered for all enabled feeds\")\n\nmanager = MISPFeedManager(\n    \"https:\u002F\u002Fmisp.organization.com\",\n    \"YOUR_MISP_API_KEY\",\n)\nmanager.enable_default_feeds()\nmanager.add_custom_feed(\n    name=\"Abuse.ch MalwareBazaar Recent\",\n    url=\"https:\u002F\u002Fbazaar.abuse.ch\u002Fexport\u002Fcsv\u002Frecent\u002F\",\n    provider=\"abuse.ch\",\n    feed_format=\"csv\",\n)\nmanager.fetch_all_feeds()\n```\n\n### Step 3: Search and Correlate Indicators\n\n```python\ndef search_indicators(misp, value=None, type_attribute=None, tags=None, last_days=30):\n    \"\"\"Search MISP for indicators with correlation.\"\"\"\n    from datetime import datetime, timedelta\n    date_from = (datetime.now() - timedelta(days=last_days)).strftime(\"%Y-%m-%d\")\n\n    search_params = {\n        \"date_from\": date_from,\n        \"published\": True,\n        \"enforceWarninglist\": True,\n    }\n    if value:\n        search_params[\"value\"] = value\n    if type_attribute:\n        search_params[\"type_attribute\"] = type_attribute\n    if tags:\n        search_params[\"tags\"] = tags\n\n    results = misp.search(\"attributes\", **search_params)\n    attributes = results.get(\"Attribute\", [])\n    print(f\"[+] Search returned {len(attributes)} attributes\")\n\n    # Group by event for context\n    events = {}\n    for attr in attributes:\n        event_id = attr.get(\"event_id\", \"\")\n        if event_id not in events:\n            events[event_id] = {\"attributes\": [], \"tags\": set()}\n        events[event_id][\"attributes\"].append({\n            \"type\": attr.get(\"type\", \"\"),\n            \"value\": attr.get(\"value\", \"\"),\n            \"category\": attr.get(\"category\", \"\"),\n            \"timestamp\": attr.get(\"timestamp\", \"\"),\n        })\n        for tag in attr.get(\"Tag\", []):\n            events[event_id][\"tags\"].add(tag.get(\"name\", \"\"))\n\n    return {\"attributes\": attributes, \"events\": events}\n\n# Search for specific IOC\nmisp = manager.misp\nresults = search_indicators(misp, value=\"203.0.113.1\")\nresults_by_type = search_indicators(misp, type_attribute=\"ip-dst\", last_days=7)\nresults_by_tag = search_indicators(misp, tags=[\"tlp:white\", \"type:OSINT\"])\n```\n\n### Step 4: Export to SIEM (Splunk \u002F Elasticsearch)\n\n```python\nimport requests\nfrom datetime import datetime, timedelta\n\nclass MISPSIEMExporter:\n    def __init__(self, misp_client):\n        self.misp = misp_client\n\n    def export_to_splunk(self, splunk_url, hec_token, days=7):\n        \"\"\"Export recent MISP indicators to Splunk via HEC.\"\"\"\n        date_from = (datetime.now() - timedelta(days=days)).strftime(\"%Y-%m-%d\")\n        results = self.misp.search(\"attributes\", date_from=date_from,\n                                    published=True, enforceWarninglist=True)\n        attributes = results.get(\"Attribute\", [])\n\n        headers = {\"Authorization\": f\"Splunk {hec_token}\"}\n        exported = 0\n        for attr in attributes:\n            event = {\n                \"event\": {\n                    \"ioc_type\": attr.get(\"type\", \"\"),\n                    \"ioc_value\": attr.get(\"value\", \"\"),\n                    \"category\": attr.get(\"category\", \"\"),\n                    \"event_id\": attr.get(\"event_id\", \"\"),\n                    \"timestamp\": attr.get(\"timestamp\", \"\"),\n                    \"tags\": [t.get(\"name\", \"\") for t in attr.get(\"Tag\", [])],\n                },\n                \"sourcetype\": \"misp:attribute\",\n                \"source\": \"misp\",\n                \"index\": \"threat_intel\",\n            }\n            resp = requests.post(\n                f\"{splunk_url}\u002Fservices\u002Fcollector\u002Fevent\",\n                headers=headers, json=event,\n                verify=not os.environ.get(\"SKIP_TLS_VERIFY\", \"\").lower() == \"true\",  # Set SKIP_TLS_VERIFY=true for self-signed certs in lab environments\n            )\n            if resp.status_code == 200:\n                exported += 1\n\n        print(f\"[+] Exported {exported}\u002F{len(attributes)} indicators to Splunk\")\n\n    def export_ioc_list(self, output_file, ioc_types=None, days=30):\n        \"\"\"Export flat IOC list for firewall\u002Fproxy blocklists.\"\"\"\n        ioc_types = ioc_types or [\"ip-dst\", \"domain\", \"hostname\", \"url\"]\n        date_from = (datetime.now() - timedelta(days=days)).strftime(\"%Y-%m-%d\")\n\n        all_iocs = []\n        for ioc_type in ioc_types:\n            results = self.misp.search(\n                \"attributes\", type_attribute=ioc_type,\n                date_from=date_from, published=True,\n                enforceWarninglist=True,\n            )\n            for attr in results.get(\"Attribute\", []):\n                all_iocs.append(attr.get(\"value\", \"\"))\n\n        unique_iocs = sorted(set(all_iocs))\n        with open(output_file, \"w\") as f:\n            for ioc in unique_iocs:\n                f.write(f\"{ioc}\\n\")\n\n        print(f\"[+] Exported {len(unique_iocs)} unique IOCs to {output_file}\")\n\nexporter = MISPSIEMExporter(misp)\nexporter.export_ioc_list(\"blocklist_ips.txt\", ioc_types=[\"ip-dst\"], days=7)\n```\n\n## Validation Criteria\n\n- MISP deployed and accessible via web interface and API\n- Default OSINT feeds enabled and fetching data\n- Custom feeds added and ingesting indicators\n- Indicators searchable with correlation across events\n- IOCs exported to SIEM (Splunk\u002FElasticsearch) successfully\n- Blocklists generated for firewall\u002Fproxy integration\n\n## References\n\n- [MISP Project](https:\u002F\u002Fwww.misp-project.org\u002F)\n- [MISP GitHub Repository](https:\u002F\u002Fgithub.com\u002FMISP\u002FMISP)\n- [MISP Default Feeds](https:\u002F\u002Fwww.misp-project.org\u002Ffeeds\u002F)\n- [PyMISP Documentation](https:\u002F\u002Fpymisp.readthedocs.io\u002F)\n- [Kraven Security: MISP Using Feeds](https:\u002F\u002Fkravensecurity.com\u002Fthreat-intelligence-with-misp-part-4-using-feeds\u002F)\n- [Cosive: What is MISP](https:\u002F\u002Fwww.cosive.com\u002Fblog\u002Fwhat-is-misp-the-ultimate-introduction)\n",{"name":5,"tags":52,"author":59,"domain":37,"license":15,"version":60,"nist_csf":61,"subdomain":34,"description":7,"mitre_attack":66},[53,54,30,55,56,57,58,34],"misp","threat-feed","indicator","sharing","correlation","siem-integration","mahipal","1.0",[62,63,64,65],"ID.RA-01","ID.RA-05","DE.CM-01","DE.AE-02",[67,68,69],"T1071","T1105","T1588.001","main","7925716f065257435fdb12e97f7e52842147d5ad",".claude\u002Fskills\u002Fbuilding-threat-feed-aggregation-with-misp","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude","https:\u002F\u002Fclaude.com\u002Fclaude-code","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho","Software · Applied AI · Quantitative Modeling · Building with Claude.","2026-06-10 12:24:46",{"source":8,"skillName":5,"commands":79,"prompt":89,"zipAvailable":90},[80,83,86],{"tool":81,"command":82},"npx","npx skills add henriquescastilho\u002Fmy-claude --skill building-threat-feed-aggregation-with-misp",{"tool":84,"command":85},"bunx","bunx skills add henriquescastilho\u002Fmy-claude --skill building-threat-feed-aggregation-with-misp",{"tool":87,"command":88},"pnpm","pnpm dlx skills add henriquescastilho\u002Fmy-claude --skill building-threat-feed-aggregation-with-misp","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbuilding-threat-feed-aggregation-with-misp\u002FSKILL.md",true,[92,97,103],{"path":93,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbuilding-threat-feed-aggregation-with-misp\u002FLICENSE",{"path":98,"resourceType":99,"resourceTypeDesc":100,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002Fapi-reference.md","REFERENCE","参考文档",2135,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbuilding-threat-feed-aggregation-with-misp\u002Freferences\u002Fapi-reference.md",{"path":104,"resourceType":105,"resourceTypeDesc":106,"sizeBytes":107,"sourceHtmlUrl":108},"scripts\u002Fagent.py","SCRIPT","脚本",6731,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fbuilding-threat-feed-aggregation-with-misp\u002Fscripts\u002Fagent.py",[110,150,159,168,190,216],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":131,"publishedAt":47},"01M6F0B6XPQ65AX2X0DWK8KT3E","markitdown","Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.","MIT","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[117,120,123,126],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000004","电子表格",{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[112,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,28],"docx","PDF","pptx","xlsx","documents","csv","ocr","Audio","Bash","markdown","convert","read","write","edit","html","images","files","youtube",{"skillNo":151,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":158,"publishedAt":47},"01M6F06SBHR9F0SDWE282Y8075","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fscientific_writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[154,155,156,157],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},[112,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,28],{"skillNo":160,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":167,"publishedAt":47},"01M6F02D4R14EJAPBWVDF9J9VQ","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[163,164,165,166],{"categoryNo":118,"categoryName":119,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":121,"categoryName":122,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":124,"categoryName":125,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":127,"categoryName":128,"taxonomyType":129,"taxonomyTypeDesc":130},[112,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,28],{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":47},"01M6F000KS6YB4MKS774G4R8ND","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fzarr-python\u002FSKILL.md",[],[175,176,177,178,179,180,181,182,183,184,185,186,187,188,189],"python","zarr python","storage","integration","s3","gcs","cloud","dask","parallel","pipelines","arrays","numpy","scientific computing","scale","scientific",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":197,"publishedAt":47},"01M6EZZJWFXM1GR78KTW6J0DN8","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fwhat-if-oracle\u002FSKILL.md",[196],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[198,199,200,201,202,203,204,205,206,207,208,143,144,209,210,211,212,213,214,215],"oracle","what if oracle","go","run","ux","futures","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies","scenario","stress",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":114,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":232,"publishedAt":47},"01M6EZZCXAEB49RXGQCJX5E8GB","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fvenue-templates\u002FSKILL.md",[222,225,228,229],{"categoryNo":223,"categoryName":224,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":226,"categoryName":227,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":230,"categoryName":231,"taxonomyType":129,"taxonomyTypeDesc":130},"01JBSEEDCAT000000000000036","内容创作者",[233,234,235,236,237,238,239,240,140,241,143,144,145,242,243,244,245,246,189,247],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","access","proposals","Academic","requirements","formatting","journal","chi"]