Why would a snapshot query be doubling up and tell...
# general
m
Why would a snapshot query be doubling up and telling me that the things are both on and off at the same time???
s
osquery generally wouldn’t. You mentioned your query is
SELECT type,state FROM windows_security_products
That should produce two rows, each with two columns.
Your screenshot looks like a SIEM post processing a log pipeline. I’d look to either your SIEM parsing rules, or your log pipeline;
Try to get logs from earlier to diagnose where your failiure is
m
Hi @seph here is the JSON that is returned directly from osquery pre-processing into elastic:
{"snapshot":[{"state":"On","type":"Firewall"},{"state":"Off","type":"Firewall"},{"state":"On","type":"Antivirus"},{"state":"Off","type":"Antivirus"}],"action":"snapshot","name":"pack/Windows Base Pack/fw_av_snapshot","hostIdentifier":"xxx","calendarTime":"Fri Jul 30 06:19:03 2021 UTC","unixTime":1627625943,"epoch":0,"counter":0,"numerics":false,"decorations":{"company":"xxx","host_hostname":"xxx","username":"xxx"}}
@seph it seems like osquery is reporting two conflicting states for the same query how can that be?????
s
Pretty weird. What's the scheduled query?
m
It's just
SELECT type,state FROM windows_security_products
set as a snapshot query and told to run every 112 seconds
It would appear that it does not do it all the time however, as I can see some good looking results such as:
{"snapshot":[{"state":"On","type":"Firewall"},{"state":"On","type":"Antivirus"}],"action":"snapshot","name":"pack/Windows Base Pack/fw_av_snapshot","hostIdentifier":"xxx","calendarTime":"Sat Jul 31 00:43:39 2021 UTC","unixTime":1627692219,"epoch":0,"counter":0,"numerics":false,"decorations":{"company":"xxx","host_hostname":"xxxx"}}
s
Does the osquery_schedule show exactly what you think the query is? If you
select *
do the other columns hint at anything?
m
@seph where do I see. the osquery_shedule?
This mystery has been solved Scooby.
Turns out user installed Bitdefender, and so it is reporting Bitdefender on, Microsoft Defender off
s
Would that have been visible in a
select *
?
m
That's what I did just now yea
I had to wait for the machine to come back online
s
great!
m
I need to rethink how I'm alerting on that table in that case