I'm trying to configure Logstash to work with SentinelOne logs, but it is not working as expected, it looks like it is not separating the fields correctly.
I configured the input to be CEF and the output to be json_lines:
What I was looking for is it actually CEF that is coming across which would be a single line with what's in your message field. Looks correct.
But it looks like the format is incorrect for what it is expecting and that's why it's breaking.
Base Format CEF:Version|Device Vendor|Device Product|Device Version|Signature ID|Name|Severity|Extension
What it should look like Mar 19 15:19:15 root CEF:0|Trend Micro|Deep Security Agent|<DSA version>|123|Out Of Allowed Policy|5|
What yours looks like <14>2021-10-06 13:23:42,535 sentinel - CEF:2|SentinelOne|Mgmt|Linux|
It's missing some base fields and with using pipes later in your message it's most likely thinking those are some base fields.
What it should look like src=10.52.116.160 suser=admin target=admin
What yours looks like fileHash= XXX |filePath= XXX |fileName= XXX
The delimiters are not standard.
If you are unable to change the message source to the format that Logstash Codec requires then using Dissect or Grok to parse the message might be the better route.
Started the Grok pattern and you can continue on with it if you want to go this route. I used WORD because the values are hidden but most likely you can use a different pattern if it matches. (UNIXPATH or WINPATH for example)
grok {
match => { "message" => "fileHash=%{WORD:fileHash}\|filePath=%{WORD:filePath}\|fileName=%{WORD:fileName}\|deviceAddress=%{WORD:deviceAddress}\|deviceHostFqdn=%{WORD:deviceHostFqdn}" }
}
Another option they can't provide a format that Logstash will process could be pipeline to pipeline.
The CEF Codec works in the input so you can't transform it to be compliant in Logstash and then process it. The idea is to have 1 pipeline that will read the input and filter to transform it to be CEF compliant. Then you output to another pipeline where you can apply the CEF Codec and it will process it properly.
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.