Module 17: SIEM Part One: Intro to ELK
Last updated
Last updated
The Discover page is where all the incoming data from agents is presented. A search bar located at the top allows users to submit their queries in Kibana Query Language (KQL) format.
Example of Standard KQL Syntax
KQL Query for Sysmon ProcessCreate Events
KQL Query for Apache access log
Results from KQL Query for Apache access log
Field
Value
source.ip
192.168.51.54
tags
apache-access
url.extension
php
url.path
/wp-admin/login.php
user_agent.device.name
Other
user_agent.name
curl
user_agent.original
curl/7.74.0
KQL Query for Snort logs
Results from KQL Query for Snort logs
Field
Value
network.type
ipv4
observer.product
ids
observer.type
ids
observer.vendor
snort
related.ip
192.168.50.54, 192.168.50.51
rule.description
"ICMP Traffic Detected"
rule.id
10000001
rule.version
0
snort.gid
1
source.address
192.168.50.54
source.ip
192.168.50.54
tags
forwarded, snort.log
For Elastic Agents, there is only one active integration called OSQuery. This integration is based on the original project and stores device-specific information into a relational database that can be queried on-demand.
Every listing of OSQuery has the following:
Query: Query that was submitted to Elastic Agents
Agents: The Elastic Agent(s) that received the query
Created at: The query's creation time
Run by: The user that submitted the query
Example of SQL syntax for OSQuery
OSQuery for text files on every Windows user's Desktop
OSQuery results for text files
appsrv01
C:\Users\Administrator\Desktop
proof.txt
OSQuery for processes listening on network ports
OSQuery results for processes listening on network ports
web01
127.0.0.1
elastic-agent
292547
6789
web01
0.0.0.0
httpd
293453
80
web01
127.0.0.1
cupsd
1259
631
...
...
...
...
...
OSQuery for all processes with outbound connections to nonstandard ports
appsrv01
172.16.51.32
57301
osquerybeat.exe
5104
172.16.51.35
9200
...
...
...
...
...
...
...
web01
172.16.51.33
33522
metricbeat
292468
172.16.51.35
9200
...
...
...
...
...
...
...
snort03
172.16.51.254
41088
elastic-agent
754
172.16.51.35
8220
KQL for failed authentications
Creating a RDP Brute Force rule
Expanded query for RDP Brute Force
Successful authentication from RDP Brute Force in most recent entry
Mar 2, 2022 @ 15:06:00.521
An account was ...
authentication
logged-in
appsrv01
172.16.50.254
--
Administrator