im new to this elk world and im currently working on a threat hunting project with ELK/Zeek.
My problem is, that i want for example to query for DNS.Length > 75 within zeek data. I know that its easy to do in splunk, but how to do it with KQL ? I cant find this variable there with length. I just found some script answers, which im not sure about how to use and where to put scripts etc. Any help would be appreciated.
i thought KQL is based on Lucene? So is lucene "the standard"?
So for this script i need to change to lucene and just put it in there ? I cant see multiple lines there, just one for "Search".
So i changed from splunk to elk bc i thought it would be easier for my project. isnt there any chance to create a new value, based on the string length of dns querys ?
For that type of query you do that in Dev Tools. That is where you can run all your custom queries. So go to Dev Tools and paste in that query and run it.
doc['field'].value throws an exception if the field is missing in a document.
To check if a document is missing a value, you can call doc['field'].size() == 0 .
Hey again, so this script worked, but now im struggling with the next querys.
I need querys to find the 10 connections from and to a host who made the most traffic, sorted from big to small. Is this even manageable with this script language?
index=zeek sourcetype=zeek_conn
| stats values(service) as Services sum(orig_bytes) as B by id.orig_h
| sort -B
| head 10
| eval MB = round(B/1024/1024,2)
| eval GB = round(MB/1024,2)
| rename id.orig_h as Source
| fields Source B MB GB Services
this is how it would look in splunk, but im not sure how to solve this with painless language..
Thanks again in advance for any help!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.