XQL Filter out specific combination

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

XQL Filter out specific combination

L1 Bithead

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 ?

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1 accepted solution

Accepted Solutions

L4 Transporter

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.

View solution in original post

4 REPLIES 4

L4 Transporter

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

L1 Bithead

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.

L4 Transporter

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.

Thanks, that solution looks like is working, will try to work with that.

  • 1 accepted solution
  • 2910 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!