Wazuh
Wazuh
https://www.linkedin.com/in/ehtishamcyber/
Documentation Wazuh
In this Documentation I will be Demonstrating the Wazuh Server on Cloud Platform such as
Microsoft Azure.
Process will be like:
Login to your Azure Account and create a Virtual Machine of Ubuntu server.
Setting up ports
Monitoring
Review and Create
Download Key
Created
Now start and Connect the Ubuntu Server Virtual Machine to access the Terminal.
Open Native SSH
Step-by-step installation:
Installing Wazuh
The Wazuh server collects and analyzes data from the deployed Wazuh agents. It runs the
Wazuh manager, the Wazuh API and Filebeat.
To start setting up Wazuh, add the Wazuh repository to the server.
Command:
1- Install the necessary packages for the installation:
sudo apt install curl apt-transport-https unzip wget libcap2-bin software-properties-
common lsb-release gnupg
2- Install the GPG key:
curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | apt-key add -
Configuring Elasticsearch
Run the following command to download the configuration file
/etc/elasticsearch/elasticsearch.yml:
Certificates creation
1- Remove the demo certificates:
rm /etc/elasticsearch/esnode-key.pem /etc/elasticsearch/esnode.pem
/etc/elasticsearch/kirk-key.pem /etc/elasticsearch/kirk.pem
/etc/elasticsearch/root-ca.pem –f
2- Generate and deploy the certificates:
Download the wazuh-cert-tool.sh:
curl -so ~/wazuh-cert-tool.sh
https://packages.wazuh.com/resources/4.2/open-
distro/tools/certificate-utility/wazuh-cert-tool.sh
curl -so ~/instances.yml
https://packages.wazuh.com/resources/4.2/open-
distro/tools/certificate-utility/instances_aio.yml
Warning
Add the following configuration to mitigate Apache Log4j2 Remote Code
Execution (RCE) vulnerability - CVE-2021-44228 - ESA-2021-31.
mkdir -p /etc/elasticsearch/jvm.options.d
echo '-Dlog4j2.formatMsgNoLookups=true' >
/etc/elasticsearch/jvm.options.d/disabledlog4j.options
chmod 2750 /etc/elasticsearch/jvm.options.d/disabledlog4j.options
chown root:elasticsearch
/etc/elasticsearch/jvm.options.d/disabledlog4j.options
4- Run the Following commands to start elastic search
systemctl daemon-reload
systemctl enable elasticsearch
systemctl start elasticsearch
Installing Filebeat
Filebeat is the tool on the Wazuh server that securely forwards alerts and archived events to
Elasticsearch.
1- Install the Filebeat package:
apt-get install filebeat
2- Download the preconfigured Filebeat configuration file used to forward the Wazuh alerts
to Elasticsearch:
curl -so /etc/filebeat/filebeat.yml https://packages.wazuh.com/resources/4.2/open-
distro/filebeat/7.x/filebeat_all_in_one.yml
URL: https://<wazuh_server_ip>
user: admin
password: admin
And Finally we got the DashBoard
Conclusions:
covering setup, configuration, and integration with Elasticsearch, Filebeat, and Kibana for
effective security monitoring and management. The step-by-step guide enables users to