Coder Social home page Coder Social logo

Comments (6)

alfred-landrum avatar alfred-landrum commented on September 24, 2024

FYI, I reproduced this on my Windows 10 laptop as well.

from build-suricata.

philrz avatar philrz commented on September 24, 2024

I've managed to reproduce this on something other than someone's personal Windows 10 laptop. 😉

It looks like the secret ingredient may be timezone settings. I spun up a Windows 2016 Server VM in Google Cloud. I installed the Brim-rc-v0.20.0-suricata20.exe artifact and imported the wrccdc pcap. All the Suricata alerts were within the pcap's time range as reflected in the picker.

image

However, that's when I noticed the timezone on the VM was at its default of UTC.

image

I then set the timezone to Pacific and redid the import, and now the alerts were outside the default range, and I had to once again change the picker settings to Whole Space to get them.

image

image

I was then able to change the timezone back to UTC and repro the problem yet again. Interestingly, from what I can tell, the delta doesn't seem to change based on which timezone I've selected, as I saw the same +2 hour difference if I changed to Eastern timezone.

from build-suricata.

philrz avatar philrz commented on September 24, 2024

I've now been able to narrow this down to a general Suricata problem.

On a scratch Windows 2016 VM in Google Cloud, I installed https://nmap.org/npcap/dist/npcap-1.00.exe and then https://www.openinfosecfoundation.org/download/windows/Suricata-6.0.0-beta1-1-64bit.msi. Using that same wrccdc.pcap, I test via:

"\Program Files\Suricata\suricata.exe" -r wrccdc.pcap

When my system timezone is set to default UTC, the timestamp of the top event in eve.json is 2018-03-23T19:58:22.647908+0000. If I paste that into the ISO8601 box at https://www.timestamp-converter.com/, it translates to:

Date (UTC)	Mar 23, 2018, 8:58:22 PM

Then when my system timezone is set to Pacific, the timestamp of the top event in eve.json is 2018-03-23T12:58:22.647908-0900. Pasted into that tool, it translates to:

Date (UTC)	Mar 23, 2018, 10:58:22 PM

While baselining in Suricata v5.0.3 I ran into the bug discussed at https://forum.suricata.io/t/eve-json-windows-timestamp-field-has-eastern-daylight-time-appended-to-timestamp/197 which leads to the change at OISF/suricata@bbdc118#diff-d8eecda9235371babc2890abb8415eeb9310a124444ea5189aa39e36025bbff9, which seems suspicious since it involves mucking with timestamps specifically on Windows, and this problem involves timestamps and we're only seeing it on Windows. @henridf is looking closer at that code.

from build-suricata.

philrz avatar philrz commented on September 24, 2024

I've opened an issue with Suricata https://redmine.openinfosecfoundation.org/issues/4183 in the event they figure it out before we do.

from build-suricata.

henridf avatar henridf commented on September 24, 2024

fixed with brimdata/suricata#2

from build-suricata.

philrz avatar philrz commented on September 24, 2024

Verified with draft Brim artifact rc-v0.20.0-suricatav5.0.3-brimpre1 that includes the fixed Suricata build. Now when I import the wrccdc pcap, the Suricata alerts are immediately visible as part of the time range that's been set based on the pcap.

image

If I isolate and group the events without changing the time range, I see the diverse set.

image

If I select "Whole Space" in the picker, the numbers remain the same, as we would expect.

image

Thanks @henridf!

from build-suricata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.