j91321.winlogbeat

ansible-role-winlogbeat

Licence GitHub Dernier commit GitHub Build Twitter

Un rôle Ansible qui installe winlogbeat pour la surveillance des journaux Windows.

Plateformes supportées :

  • Windows 10
  • Windows Server 2019
  • Windows Server 2016

Exigences

Aucune

Variables de Rôle

Variables Ansible à partir de defaults/main.yml

winlogbeat_event_logs:
  channels:
    - name: Application
      ignore_older: "72h"
    - name: System
      ignore_older: "72h"
  security: true
  sysmon: false
  powershell: true
  wef: false

winlogbeat_output:
  type: "elasticsearch"
  elasticsearch:
    hosts:
      - "localhost:9200"
    security:
      enabled: false

winlogbeat_processors: |
  - add_host_metadata:
      when.not.contains.tags: forwarded
  - add_cloud_metadata: ~

winlogbeat_service:
  install_path_64: "C:\\Program Files\\Elastic\\winlogbeat"
  install_path_32: "C:\\Program Files (x86)\\Elastic\\winlogbeat"
  version: "7.9.1"
  download: true

Le winlogbeat_service.download indique si le fichier zip d'installation doit être téléchargé depuis https://artifacts.elastic.co/ ou s'il est copié depuis le serveur Ansible. Si vos serveurs n'ont pas accès à Internet, téléchargez le fichier zip d'installation et placez-le dans le dossier .files/. Ne changez pas le nom du fichier zip.

Attention assurez-vous que install_path_64 et install_path_32 se terminent par \winlogbeat. La dernière tâche qui effectue le nettoyage supprime tout le reste dans le chemin d'installation qui ne contient pas le numéro de version actuel de winlogbeat !

Dépendances

Aucune.

Exemple de Playbook

Exemple de playbook avec un chemin d'installation modifié, collecte de journaux de Windows Defender ajoutée, suppression d'événements bruyants des journaux de sécurité à l'aide de processeurs et configuration de sortie Redis.

- name: Installer winlogbeat sur les postes de travail
  hosts:
    - workstations
  vars:
    winlogbeat_service:
       install_path_64: "C:\\Program Files\\monitoring\\winlogbeat"
       install_path_32: "C:\\Program Files (x86)\\monitoring\\winlogbeat"
       version: "7.9.1"
       download: false
    winlogbeat_event_logs:
      channels:
        - name: Application
          ignore_older: "72h"
        - name: System
          ignore_older: "72h"
        - name: Microsoft-Windows-Windows Defender/Operational
          ignore_older: "72h"
      security: true
      security_processors: |
          - drop_event.when.or:
        - equals.winlog.event_id: 4656 # Une poignée d'objet a été demandée.
        - equals.winlog.event_id: 4658 # La poignée d'objet a été fermée.
        - equals.winlog.event_id: 4659 # Une poignée d'objet a été demandée avec l'intention de supprimer.
        - equals.winlog.event_id: 4660 # Un objet a été supprimé.
        - equals.winlog.event_id: 4663 # Une tentative a été faite pour accéder à un objet.
        - equals.winlog.event_id: 4664 # Une tentative a été faite pour créer un lien hard.
        - equals.winlog.event_id: 4691 # Un accès indirect à un objet a été demandé.
      powershell: true
      sysmon: true
      wef: false
    winlogbeat_template:
      enabled: false
    winlogbeat_general:
      tags:
        - "workstation"
        - "winlogbeat"
    winlogbeat_output:
      type: "redis"
      redis:
        hosts:
          - "192.168.24.33:6379"
        password: "mon_mot_de_passe_long_et_complexe_redis"
        key: "winlogbeat-workstation"

Licence

MIT

Informations sur l'Auteur

j91321

Notes

Le rôle contient un modèle utilisable avec winlogbeat 6 dans ./templates/winlogbeat6.yml.j2. Pour utiliser ce modèle, soit remplacez le winlogbeat.yml.j2, soit modifiez les tâches.

À propos du projet

Install Winlogbeat for Windows event log monitoring.

Installer
ansible-galaxy install j91321.winlogbeat
Licence
mit
Téléchargements
4k
Propriétaire