The project explains how to set up a home lab for Elastic Stack Security Information and Event Management (SIEM) using the Elastic Web portal and a Kali Linux VM. You'll also learn to generate security events on the Kali VM, configure an agent to send data to the SIEM, and analyze the logs effectively.
- Prerequisites
- Overview of Tasks
- Task 1: Set up an Elastic Account
- Task 2: Setting up the Linux VM
- Task 3: Setting up the Agent to Collect Logs
- Task 4: Generating Security Events on the Kali VM
- Task 5: Querying for Security Events in the Elastic SIEM
- Task 6: Create a Dashboard to Visualize Events
- Task 7: Create an Alert
- Conclusion
Before starting, ensure you have:
- VirtualBox or VMware
- Basic knowledge of Linux and virtualization software
- Set up a free Elastic account.
- Install the Kali VM.
- Configure the Elastic Agent on the Linux VM to collect and forward logs.
- Generate security events on the Kali VM.
- Query for security events in the Elastic SIEM.
- Create a Dashboard to visualize security events.
- Create alerts for security events.
- Sign up at Elastic Cloud.
- Log in to the Elastic Cloud console.
- Click “Start your free trial.”
- Create a deployment and select “Elasticsearch” as the deployment type.
- Choose a region and deployment size, then create the deployment.
- Wait for configuration to complete.
- Download the Kali Linux VM from Kali Linux.
- Create a new VM using VirtualBox or VMware.
- Start the VM and follow the prompts to install Kali Linux.
- Log in using credentials:
kali
(username) andkali
(password).
-
Log in to the Elastic SIEM instance.
-
Install the Elastic Defend agent on your Kali VM.
-
Run the command provided in the Elastic portal on your Kali terminal.
- Ensure Nmap is installed (
sudo apt-get install nmap
if not preinstalled). - Run Nmap scans (
sudo nmap <ip-address>
) to generate security events. - Experiment with various Nmap commands like:
- Navigate to “Logs” under “Observability” in your Elastic deployment.
- Use queries like
event.action: "nmap_scan"
orprocess.args: "sudo"
. - View and analyze the results in the logs table.
-
Go to “Dashboards” under “Analytics” in the Elastic web portal.
-
Use metrics like “Count” (vertical field) and “Timestamp” (horizontal field).
-
Define actions like sending notifications or triggering webhooks.
-
Enable the rule to monitor logs and trigger alerts for specific events.
The project provides a hands-on approach to setting up a SIEM home lab using Elastic Stack and Kali Linux. It equips you with practical skills for configuring, monitoring, and analyzing security events.