diff --git a/monitoring/docker-compose.yml b/monitoring/docker-compose.yml index e113d3d6..3526f42b 100644 --- a/monitoring/docker-compose.yml +++ b/monitoring/docker-compose.yml @@ -34,7 +34,7 @@ services: # ─── Wazuh Manager ──────────────────────────────────────── wazuh.manager: - image: wazuh/wazuh-manager:4.14.4 + image: wazuh/wazuh-manager:4.14.5 hostname: wazuh.manager container_name: wazuh_manager restart: unless-stopped @@ -81,7 +81,7 @@ services: # ─── Wazuh Indexer (OpenSearch) ─────────────────────────── wazuh.indexer: - image: wazuh/wazuh-indexer:4.14.4 + image: wazuh/wazuh-indexer:4.14.5 hostname: wazuh.indexer container_name: wazuh_indexer restart: unless-stopped @@ -109,7 +109,7 @@ services: # ─── Wazuh Dashboard ────────────────────────────────────── wazuh.dashboard: - image: wazuh/wazuh-dashboard:4.14.4 + image: wazuh/wazuh-dashboard:4.14.5 hostname: wazuh.dashboard container_name: wazuh_dashboard restart: unless-stopped diff --git a/monitoring/wazuh/config/wazuh_indexer/wazuh.indexer.yml b/monitoring/wazuh/config/wazuh_indexer/wazuh.indexer.yml index 51fb84e8..c88a6987 100644 --- a/monitoring/wazuh/config/wazuh_indexer/wazuh.indexer.yml +++ b/monitoring/wazuh/config/wazuh_indexer/wazuh.indexer.yml @@ -1,9 +1,12 @@ network.host: "0.0.0.0" node.name: "wazuh.indexer" -cluster.initial_master_nodes: - - "wazuh.indexer" cluster.name: "wazuh-cluster" +# Compatibilité Filebeat 7.x (libbeat) avec OpenSearch 2.x +# Filebeat envoie _type dans les requêtes bulk — OpenSearch 2.x le rejette +# sans ce flag. +compatibility.override_main_response_version: true + path.data: /var/lib/wazuh-indexer path.logs: /var/log/wazuh-indexer diff --git a/monitoring/wazuh/config/wazuh_manager/decoders/modsecurity_decoder.xml b/monitoring/wazuh/config/wazuh_manager/decoders/modsecurity_decoder.xml index 8685a477..24768c91 100644 --- a/monitoring/wazuh/config/wazuh_manager/decoders/modsecurity_decoder.xml +++ b/monitoring/wazuh/config/wazuh_manager/decoders/modsecurity_decoder.xml @@ -1,29 +1,35 @@ - - - ModSecurity: + + + {"transaction":{ - - - modsecurity - ModSecurity: Access denied - \[client (\d+\.\d+\.\d+\.\d+):\p+\] ModSecurity: Access denied with code (\d+) \(phase \d+\)\.\s*(\S[^[]*?)\s*\[id "(\d+)"\][^\[]*\[msg "([^"]+)"\][^\[]*\[uri "([^"]+)"\] - srcip,status,extra_data,id,extra_data2,url + + + docker-waf-modsec + "client_ip":"(\d+\.\d+\.\d+\.\d+)".+"uri":"([^"]+)".+"http_code":403.+"ruleId":"(\d+)" + srcip,url,id - - - modsecurity - ModSecurity: Warning - \[client (\d+\.\d+\.\d+\.\d+):\p+\] ModSecurity: Warning\.[^\[]*\[id "(\d+)"\][^\[]*\[msg "([^"]+)"\][^\[]*\[uri "([^"]+)"\] - srcip,id,extra_data,url + + + docker-waf-modsec + "client_ip":"(\d+\.\d+\.\d+\.\d+)".+"uri":"([^"]+)".+"ruleId":"(\d+)" + srcip,url,id + + + + + docker-waf-modsec + "client_ip":"(\d+\.\d+\.\d+\.\d+)".+"uri":"([^"]+)" + srcip,url diff --git a/monitoring/wazuh/config/wazuh_manager/rules/local_modsecurity_rules.xml b/monitoring/wazuh/config/wazuh_manager/rules/local_modsecurity_rules.xml new file mode 100644 index 00000000..e8c99b6d --- /dev/null +++ b/monitoring/wazuh/config/wazuh_manager/rules/local_modsecurity_rules.xml @@ -0,0 +1,37 @@ + + + + + + + docker-waf-modsec-pass + ModSecurity: trafic légitime (supprimé). + + + + + docker-waf-modsec-rule + ModSecurity: règle $(id) — $(srcip) → $(url) + web,modsecurity,attack, + + + + + docker-waf-modsec-blocked + ModSecurity: accès bloqué (403) — $(srcip) → $(url) [règle $(id)] + web,modsecurity,attack,blocked, + + + + + 100102 + + ModSecurity: blocages répétés depuis $(srcip) — scan ou attaque + web,modsecurity,attack,blocked, + + + diff --git a/monitoring/wazuh/config/wazuh_manager/rules/local_ssh_pam_noise.xml b/monitoring/wazuh/config/wazuh_manager/rules/local_ssh_pam_noise.xml index d04aa6b8..018c2579 100644 --- a/monitoring/wazuh/config/wazuh_manager/rules/local_ssh_pam_noise.xml +++ b/monitoring/wazuh/config/wazuh_manager/rules/local_ssh_pam_noise.xml @@ -7,6 +7,37 @@ détection de brute-force (5710, 5716, 5720, 5760, 5763…) --> + + + + 2900 + Dpkg: supprimé. + + + 2900 + Dpkg: supprimé. + + + 2900 + Dpkg: supprimé. + + + 2900 + Dpkg: supprimé. + + + + + + + + 5715 + 90.50.148.138 + sshd: auth success IP admin — supprimé. + + + @@ -74,3 +105,30 @@ + + + + + . + Suricata: malicious domain — non applicable (pas d'agent Suricata). + + + . + Suricata: malicious domain DNS — non applicable. + + + + + + . + Windows: failed logon malicious IP — non applicable (pas d'agent Windows). + + + . + Windows: successful logon malicious IP — non applicable. + +