mispthreat-intelligenceioc
MDstable
NoteSnippetChecklistPlaybook
MISP — Threat Intelligence & Partage d'IOC
Déploiement MISP, gestion des événements, partage d'IOC, intégration TheHive et feeds automatisés
snippetintermediate 2026-05-30 3 min read
mispthreat-intelligenceiocstixtaxiisoc
Déploiement Docker
bash
git clone https//github.com/MISP/misp-dockercd misp-dockercp templateenv env# Éditer .env : URL, admin email, passworddocker compose up -d# Accès : https://localhost# Compte : admin@admin.test / admin (à changer)
yaml
# docker-compose.yml (extrait clé)services:misp:image: ghcr.io/misp/misp-docker/misp-core:latestports:- "443:443"- "80:80"environment:- MISP_BASEURL=https://misp.local- MISP_ADMIN_EMAIL=admin@org.local- MISP_ADMIN_PASSPHRASE=ChangeMe!2026volumes:- misp_data:/var/www/MISP/app/filesmisp-modules:image: ghcr.io/misp/misp-docker/misp-modules:latestenvironment:- REDIS_BACKEND=redis
Concepts clés
Structure d'un événement
EventInfo titreDistribution org community connected all sharing-group)Threat level 1High 2Med 3Low 4UndefinedAnalysis 0Initial 1Ongoing 2CompletedAttributes IOCip-src ip-dstdomainurlmd5 sha1 sha256email-src email-subjectfilename
Catégories d'attributs
| Catégorie | Exemples | |-----------|----------| | Network activity | ip-src, ip-dst, domain, url | | Payload delivery | md5, sha256, filename | | Artifacts dropped | regkey, mutex | | External analysis | link, comment | | Antivirus detection | yara, sigma |
API MISP
Authentification
bash
MISP_URL"https://misp.local"API_KEY"votre_authkey"curl -k -H "Authorization: $API_KEY"-H "Accept: application/json"$MISP_URL/users/view/me
Créer un événement
bash
curl -k -X POST-H "Authorization: $API_KEY"-H "Content-Type: application/json"-d"Event""info" "Campagne phishing Q1 2026""threat_level_id" 2"analysis" 1"distribution" 1"Attribute""type" "ip-dst" "category" "Network activity" "value" "185.220.101.45""type" "domain" "category" "Network activity" "value" "evil-domain.xyz""type" "sha256" "category" "Payload delivery""value" "a3f5b2c8d1e4f7a9b0c3d6e9f2a5b8c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6"$MISP_URL/events/add
Recherche d'IOC
bash
# Rechercher une IPcurl -k -X POST-H "Authorization: $API_KEY"-H "Content-Type: application/json"-d '{"value": "185.220.101.45", "type": "ip-dst"}'$MISP_URL/attributes/restSearch# Rechercher par tagcurl -k -X POST-H "Authorization: $API_KEY"-H "Content-Type: application/json"-d '{"tags": ["tlp:red", "apt:lazarus"]}'$MISP_URL/events/restSearch
Export STIX 2.1
bash
curl -k -H "Authorization: $API_KEY"-H "Accept: application/json""$MISP_URL/events/restSearch/download/stix2"
Feeds — Threat Intelligence automatisée
bash
# Feeds recommandés (Administration > Feeds)Abusech URLhaus URLs malveillantesAbusech MalwareBazaar Hashes malwareAbusech ThreatFox IOC multi-typesCIRCL OSINT Feed Events MISP publicsBotvrijeu Domaines/IPs malveillantsDigitalSide Threat-Intel APT indicators# Mise à jour manuellecurl -k -X GET -H "Authorization: $API_KEY"$MISP_URL/feeds/fetchFromAllFeeds
Intégration TheHive ↔ MISP
Configuration côté TheHive
hocon
# application.confmisp {servers = [{name = productionurl = "https://misp.local"auth {type = keykey = "MISP_API_KEY"}wsConfig.ssl.loose.acceptAnyCertificate: true}]interval = 5 minutes}
Workflow automatique
1 MISP dtecte un vnement exporte vers TheHive2 TheHive cre une alerte3 SOC analyse transforme en Case si confirm4 Post-incident enrichit MISP avec nouveaux IOC
Tags & Taxonomies
bash
# Taxonomies importantes à activertlp Traffic Light Protocolmisp Niveaux de confianceadmiralty-scale Fiabilit de la sourcekill-chain MITRE Kill Chain phasesworkflow Statut de traitement# Application d'un tag sur un événementAdministration > Taxonomies > EnableEvent > Tags > Add tag
PyMISP — Intégration Python
python
from pymisp import PyMISP, MISPEvent, MISPAttributemisp = PyMISP("https://misp.local", "API_KEY", False)# Créer un événementevent = MISPEvent()event.info = "IOC from SIEM correlation"event.threat_level_id = 2attr = MISPAttribute()attr.type = "ip-src"attr.value = "10.0.0.50"attr.comment = "Source interne compromise"event.add_attribute(**attr.to_dict())misp.add_event(event)# Chercher un IOCresult = misp.search(value="185.220.101.45", type_attribute="ip-dst")for attr in result:print(f"Trouvé dans event {attr['Event']['id']}: {attr['value']}")
OPS·BRAIN v1.092 notes · Securitylocal