- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
06-06-2022 01:09 AM
Hello
i am trying to create XQL filter to filter out all known connections, so it only returns me connections that should not happen.
So i create separate line for each of those knows connections, like:
filter (action_local_ip != "10.130.130.34" and action_local_port != 445)
but that doesn't work, it filters out all 445 source ports from report, and does not show rest of connections from 10.130.130.34.
How to create that kind of filter that filters out only ip and port combination ?
06-07-2022 06:40 AM
You can add an OR to the filter and use parenthesis to group your operators, like so:
| filter (action_local_ip = "10.130.130.34" and action_local_port != 445) or action_local_ip != "10.130.130.34"
This selects either logs where the local IP is 10.130.130.34 and the source port is not 445, or logs where the local IP is not 10.130.130.34.
06-06-2022 07:55 AM
Hi Mbaltalksnis,
Your query is filtering out 10.130.130.34 (action_local_ip != 10.130.130.34) which is why you're not seeing any additional traffic for that host. If you wanted to see traffic from that host where the local port is not 445, you just need to drop the '!' from the action_local_ip portion of the query, as follows:
data_set = xdr_data
| filter event_type = ENUM.NETWORK
| filter action_local_ip = 10.130.130.34 and action_local_port != 445
06-07-2022 12:48 AM
In that filter that you provided in results i only get rest of the ports from 10.130.130.34, and there are no other local IPs in output.
06-07-2022 06:40 AM
You can add an OR to the filter and use parenthesis to group your operators, like so:
| filter (action_local_ip = "10.130.130.34" and action_local_port != 445) or action_local_ip != "10.130.130.34"
This selects either logs where the local IP is 10.130.130.34 and the source port is not 445, or logs where the local IP is not 10.130.130.34.
06-08-2022 07:37 AM
Thanks, that solution looks like is working, will try to work with that.
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!