Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem correlating results in a subsearch #51

Open
jimmony opened this issue Apr 27, 2017 · 0 comments
Open

Problem correlating results in a subsearch #51

jimmony opened this issue Apr 27, 2017 · 0 comments

Comments

@jimmony
Copy link

jimmony commented Apr 27, 2017

Hello,

I've been trying to get a subsearch to work but it doesn't seem to do what i expect. I've boiled down what i'm doing to the following scenario...

query: class=bro_http srcip:"192.168.1.1" groupby:dstip
expected result: [192.168.101.10, 192.168.13.7]
actual result: [192.168.101.10, 192.168.13.7]

query: class=bro_conn srcip:"192.168.1.1" groupby:dstip
expected result: [192.168.101.10, 192.168.13.7]
actual result: [192.168.101.10, 192.168.13.7]

query: class=bro_http srcip:"192.168.1.1" groupby:dstip | subsearch(class=bro_conn groupby:dstip,dstip)
expected result: [192.168.101.10, 192.168.13.7]
actual result: []

I though that the sub search must be creating a query where the input IPs were ANDed together however after looking into the code in Query.pm it seems that they are OR'd together. If i force the initial query to return only one dstip then the result still comes back empty so there must be more to it.

If i leave out the second parameter of subsearch() then i get a lot of results but it does not constrain the ips to the dstip.

Id be happy to look into this further but i cannot seem to see the subsearch query being written to a log...
line 795: $self->log->trace('Subsearch query: ' . $subsearch_query_string);

All the best

Jim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant