From 4d3fcef76353d3d19cb87eae2dde47e13125d8fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Mu=C3=B1oz?= Date: Tue, 16 May 2023 15:16:52 -0500 Subject: [PATCH] Inital Build --- wazuhdebian.sh | 27 +++++++++++++++++++++++++++ wazuhdebian.sh.asc.sig | 7 +++++++ 2 files changed, 34 insertions(+) create mode 100755 wazuhdebian.sh create mode 100644 wazuhdebian.sh.asc.sig diff --git a/wazuhdebian.sh b/wazuhdebian.sh new file mode 100755 index 0000000..2a4201a --- /dev/null +++ b/wazuhdebian.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Descargar e instalar el agente de Wazuh +wget -qO - https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add - +echo "deb https://packages.wazuh.com/4.x/apt/ stable main" | tee /etc/apt/sources.list.d/wazuh.list +apt-get update + +# Obtener la clave del agente del servidor Wazuh +echo "Ingrese la dirección IP o nombre de host del servidor Wazuh: " +read server_ip +echo "Ingrese el key del agente: " +read agent_key + +WAZUH_MANAGER="$server_ip" apt-get install wazuh-agent +/var/ossec/bin/manage_agents -i $agent_key + +# Iniciar el agente de Wazuh +systemctl daemon-reload +systemctl enable wazuh-agent +systemctl start wazuh-agent + +# Desactivar las actualizaciones automáticas del agente +echo "Desactivando actualizaciones del wazuh-agent" +sed -i "s/^deb/#deb/" /etc/apt/sources.list.d/wazuh.list +apt-get update + + diff --git a/wazuhdebian.sh.asc.sig b/wazuhdebian.sh.asc.sig new file mode 100644 index 0000000..6ac4547 --- /dev/null +++ b/wazuhdebian.sh.asc.sig @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- + +iIoEABYIADIWIQRFi3VFYtlWy+Zyp4AvKHk3FVpDgAUCZF/R3RQca211bm96QGNv +bmRvcmJzLm5ldAAKCRAvKHk3FVpDgNUMAP9bIAm7BbxhpGP8Tu0mSCym3/XMP60b +jOozQTpXcISbEwEAzMw228QzvfLLk5s6AFZECb4B7231da4FVagJIdmbEQs= +=E2UD +-----END PGP SIGNATURE-----