- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
04-19-2023 04:15 PM
Hello Everyone,
I am trying to find a way to search for multiple of the same file hashes across multiple field types, but can't seem to figure it out. I was thinking it could be something like:
dataset = xdr_data | filter where action_file_sha256 or actor_process_image_sha256 or action_module_sha256 in ("hash1", "hash2")
...but that's not working. I do know that the below type of query works, but it doesn't scale well when you account for the fact that there are many other "sha256" field types:
dataset = xdr_data | filter action_file_sha256 in ("hash1", "hash2") or action_module_sha256 in ("hash1", "hash2") or action_process_image_sha256 in ("hash1", "hash2")
Any help would be greatly appreciated. Thanks!
04-20-2023 02:14 AM - edited 04-20-2023 02:17 AM
Hi @DannyKing
Thank you for writing to live community!
Based on your Use Case wherein you would like to search for same hash across different field types, while there could be different ways. One way for example you may try is Union stage.
Query for example:
config case_sensitive = false | preset = xdr_process | filter action_process_image_sha256 = "8200755cbedd6f15eecd8207eba534709a01957b172d7a051b9cc4769ddbf233"
| union (preset = xdr_file | filter action_file_sha256 = "8200755cbedd6f15eecd8207eba534709a01957b172d7a051b9cc4769ddbf233")
| union (preset = xdr_image_load | filter action_module_sha256 = "8200755cbedd6f15eecd8207eba534709a01957b172d7a051b9cc4769ddbf233")
Hope this helps!
Please mark the response as "Accept as Solution" if it answers your query.
Regards.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!