Elastic EDR
Configured EDR in ELK and installed EDR agent into a Linux virtual machine aggregate logs and analyze the virtual machine to detect abnormal behaviour.
What is EDR?
EDR stand for Endpoint detection & response. The endpoint are referring server, laptop, desktop, mobile device. EDR collect activity data happen within the endpoint, analyze the behavior of the endpoint. The key component of ERD included real-time monitoring, threat detection, incident response, and data collection and analysis.
Threat detection techniques used by EDR solutions include:
- Signature analysis: Network traffic signatures are checked against a database of known malware signatures to find a match.
- Behavioral analysis: The accepted behavior threshold of the endpoint is benchmarked to identify instances of unusual behavior, even if all traffic signatures are valid.
- Sandbox analysis: Potentially malicious files are placed in a safe environment called a sandbox and then executed to observe their behavior without risking any damage to the endpoint.
- Whitelist/blacklist matching: Endpoint activities are checked against a predetermined list of whitelisted and blacklisted IP addresses to allow or deny network traffic.
Setup ERD on Elastic
Create Elastic account
- Create a free account on Elastic platform. → https://cloud.elastic.co/registration
- Free account have short trial period for you to test out Elastic services.
Create a deployment with any cloud provider you want.
- Choose a region that near you server or device location and size you need for your project. Then click on “Create Deployment”.
- Wait for the configuration to complete.
- Once deployment is ready, click “continue”
Create VM
We need to have a host to represent as endpoint that EDR can gather logs. You can use any VM or device for this, as long as that device able to connect internet. I will use Kali Linux VM for this tutorial.
We can download a Kali Linux VM from HERE.
Download and install any VM according your preferred virtualization platform.
Install Elastic agent on VM to collect logs
An agent is an application running in device’s background to collect and send data to centralized system like Elastic platform for analysis and monitoring.
Log in to Elastic platform, navigate to integration page.
Search for “Elastic Defend”.
Click “Add Elastic Defend”
Click “Install Elastic Agent”
Follow the instructions to install an agent on your device.
Paste the command script to your device that you wish to install the Elastic agent. The script will install the agent for you.
Once the agent finished install, you will see a message mentioning “Elastic Agent has been successfully installed”. It will start collecting the information in the device and forward it to Elastic platform for analysis. You can verify the generated log files on Linux with this file page:
/opt/Elastic/Endpoint/state/log, but this folder required root user privilege to access.You can also verify is the Elastic agent running in you device by this command:
1
systemctl status elastic-agent.service
Generate log stream
In order to verify the agent is running and sending the data to Elastic platform, we run a few command on this device. For example activate some service like ssh, running a nmap scan within that deivces.
Verify logs on Elastic
After a few minute, the agent should be log those action preformed on previous step and send to Elastic platform.
Navigate to Observability > Log.
Enter query into search bar. For example: to search all log related to nmap by
process.command_line.text :"nmap”orprocess.args: "nmap”.You can get full detail by clicking the extend icon on the most left icon button under the action column.
Extra: Create dashboard on Elastic
We can also create a visualization dashboard on Elastic to analyze the logs and identify patterns or anomalies in the data.
Navigate to Analytics > Dashboards.
Click “Create Dashboard”
Click “Create visualization”
Drag the “Record” from left panel to center.
Select “Area” on the visualization setting panel on right-hand side. Leave “Horizontal axis” and ”Vertical axis” as default.
Save the dashboard.
Conclusion
We enabled EDR service on Elastic platform, and installed an agent on our device that keep collecting and sending the device processes data to Elastic platform for analysis and monitoring. We also created a dashboard to visualize our data on Elastic platform.
References
- A Simple Elastic SIEM Lab
- Build a Powerful Home SIEM Lab Without Hassle! (Step by Step Guide)
- strandjs/IntroLabs
- How To Setup ELK
- Understanding the function of EDR, IDS, and IPS in Cyber Security
- Linux IDS/EDR vs. CDR
- How EDR Works
- Protecting Your Castle: Understanding IDS, IPS, and EDR
- What Is EDR and Why Is It Important?
- What Is Endpoint Detection and Response?



















