Closed erezhazan1 closed 3 years ago
Hey! I just read this medium article https://medium.com/@7a616368/replaying-windows-event-logs-against-elastalert-and-sigma-rules-using-helk-6db6edde6760
"Elasticsearch will naturally use the original event time as the data for the @timestamp field"
"To get around this, we can actually use the timestamp_field in the rule definition itself to tell Elastalert to look at the time stamp of ingestion into HELK, rather than the true event time as by adding the line below: timestamp_field: etl_processed_time"
Which means that the time field etl_processed_time gives the correct time of the event, but when searching for events, it gives me the time by the time field @timestamp, which is not the correct one.
Does anyone have the same issue?
@erezhazan1 what timezone is HELK using? what timezones are the logs coming in as? are you using NTP - and verify everything in sync? time stamps are really hard if not impossible, some of the above may help the issue - but if it's not just some simple timezone things - it's best to use UTC as reported from the box.. and why we add a lot of timestamps in the pipeline re-open if I can help anymore
Describe the problem
For some reason, since I'm the only one that's opening an issue on this, the logs that I'm getting from Winlogbeat are with a wrong timestamp, which is in some cases a day ahead, so I need to search for logs that are 1 day ahead of me. Also the event_original_time, and the event_recorded_time are with wrong dates (about almost 1 day ahead). The only right date stamp is the etl_processed_time.
@timestamp - 2020-09-11 @ 19:50:32.816 event_original_time - 2020-09-11T16:50:32.816Z event_recorded_time - 2020-09-11T06:52:32.322Z
etl_processed_time - 2020-09-11 @ 09:52:35.563
in the Even original message, I have the UtcTime: 2020-09-11 16:50:32.816
--
Provide the output of the following commands
Get operating system and version for linux (except Mac) use:
cat /etc/os-release
for Mac/OSX use:
sw_vers
Get disk space, memory, processor cores, and docker storage
echo -e "\nDocker Space:" && df -h /var/lib/docker; echo -e "\nMemory:" && free -g; echo -e "\nCores:" && getconf _NPROCESSORS_ONLN
Get output of the HELK docker containers:
docker ps --filter "name=helk"
Provide the HELK installation logs located at /var/log/helk-install.log if you are having install errors
What version of HELK are you using
run the command from within the HELK root directory
cat .git/refs/heads/master
and include what date you cloned the HELK repo
What version of Winlogbeat are you using if you are using Windows/WEF logs
What steps did you take trying to fix the issue
Recreate the Index with default timestamp of etl_processed_time
How could we replicate the issue
Fresh eval Windows 10, version 1809 with sysmon64 installed and Winlogbeat Version 7.6.2, and nothing more.
Any additionally code or log context you would like to provide
Any additional context or input you have
I also set-up the HELK with neu5ron repo and Winlogbeat Version 7.7.1, and I got the same output
Just as FYI if it helps I did it initially with this guide:
https://www.blackhillsinfosec.com/how-to-deploy-windows-optics-commands-downloads-instructions-and-screenshots/
but without the WEF / WEC part.