
DFIR ELK Setup Guide
The following is a step-by-step guide on setting up a DFIR ELK instance on Windows.
Step 1: Prerequisites
Before installation, ensure:
-
Windows 10/11 or Windows Server 2016+ (64-bit)
-
Java JDK 17 (Required for Elasticsearch & Logstash)
-
At least 8GB RAM (16GB+ recommended)
-
Administrator privileges
-
PowerShell 5.1+
Step 2: Install Java JDK 17
ELK requires Java. Download and install:
-
Run the installer and follow prompts.
-
Set JAVA_HOME environment variable:
-
Open System Properties > Environment Variables.
-
Add a new variable:
Variable: JAVA_HOME Value: C:\Program Files\Java\jdk-17.x.x (your JDK path)
-
Update
Path
variable to include%JAVA_HOME%\bin
.
-
Step 3: Download & Configure Elasticsearch
-
Download Elasticsearch (v8.x) from Elastic.co.
-
Extract the ZIP to
C:\ELK\elasticsearch
. -
Configure Elasticsearch:
-
Open
C:\ELK\elasticsearch\config\elasticsearch.yml
in a text editor. -
Modify:
yamlcluster.name: dfir-cluster node.name: dfir-node network.host: 0.0.0.0 http.port: 9200 discovery.type: single-node # For single-node setup xpack.security.enabled: false # Disable security for testing (enable in prod)
-
-
Run Elasticsearch:
-
Open PowerShell as Admin and execute:
powershellcd C:\ELK\elasticsearch\bin .\elasticsearch.bat
-
Verify it’s running:
Openhttp://localhost:9200
in a browser (should return JSON).
-
Step 4: Install & Configure Logstash
-
Download Logstash from Elastic.co.
-
Extract to
C:\ELK\logstash
. -
Create a DFIR Pipeline Config:
-
Open
C:\ELK\logstash\config\logstash-sample.conf
and modify:confinput { file { path => "C:\DFIR_Logs\*.log" # Path to forensic logs (e.g., Sysmon, Windows Event Logs) start_position => "beginning" } } filter { grok { # Parse logs (customize for your log format) match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} %{LOGLEVEL:loglevel} %{GREEDYDATA:message}" } } } output { elasticsearch { hosts => ["http://localhost:9200"] index => "dfir-logs-%{+YYYY.MM.dd}" } }
-
-
Run Logstash:
powershellcd C:\ELK\logstash\bin .\logstash.bat -f C:\ELK\logstash\config\logstash-sample.conf
Step 5: Install & Configure Kibana
-
Download Kibana from Elastic.co.
-
Extract to
C:\ELK\kibana
. -
Configure Kibana:
-
Open
C:\ELK\kibana\config\kibana.yml
and modify:yamlserver.port: 5601 server.host: "0.0.0.0" elasticsearch.hosts: ["http://localhost:9200"]
-
-
Run Kibana:
powershellcd C:\ELK\kibana\bin .\kibana.bat
-
Access Kibana:
-
Open
http://localhost:5601
in a browser. -
Go to Discover > Create Index Pattern (
dfir-logs-*
).
-
Step 6: Ingest DFIR Data (Example: Sysmon Logs)
-
Install Sysmon (if not already):
powershellsysmon.exe -i -accepteula -h md5,sha256 -l -n
-
Forward Sysmon logs to Logstash:
-
Use Winlogbeat or NXLog to send Windows Event Logs to Logstash.
-
Example Winlogbeat config (
winlogbeat.yml
):yamlwinlogbeat.event_logs: - name: Microsoft-Windows-Sysmon/Operational output.logstash: hosts: ["localhost:5044"]
-
Step 7: Visualize DFIR Data in Kibana
-
Create Dashboards:
-
Go to Kibana > Dashboard.
-
Import pre-built DFIR dashboards (e.g., Sigma Detection Dashboards).
-
-
Example Visualizations:
-
Timeline of Suspicious Processes
-
Network Connections Heatmap
-
Malware Detection Alerts
-