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

BOT: DNS lookup #373

Closed
robcza opened this issue Oct 22, 2015 · 13 comments
Closed

BOT: DNS lookup #373

robcza opened this issue Oct 22, 2015 · 13 comments

Comments

@robcza
Copy link
Contributor

robcza commented Oct 22, 2015

We are considering a bot to do a DNS lookup for events, where only fqdn is included. Except the performance issues that will be the same as in the case of reverse_dns expert bot, we have encountered another issue. Forward lookup could return more than one IP address for the domain, what to do with the result?

  • split the event in more events and fill the source.ip with the results of the dns lookup
  • add new attribute for the results of the dns lookup

What do you suggest?

@aaronkaplan
Copy link
Member

On 22 Oct 2015, at 15:03, Robert Šefr notifications@github.com wrote:

We are considering a bot to do a DNS lookup for events, where only fqdn is included. Except the performance issues that will be the same as in the case of reverse_dns expert bot, we have encountered another issue. Forward lookup could return more than one IP address for the domain, what to do with the result?

hmm, good question.

• split the event in more events and fill the source.ip with the results of the dns lookup

I guess that depends on the event.

• add new attribute for the results of the dns lookup
an array?

What do you suggest?

Can you give us an example of such an event?


Reply to this email directly or view it on GitHub.

@robcza
Copy link
Contributor Author

robcza commented Oct 22, 2015

Array is an obvious solution, and although I'm not a fan of adding new attributes, I don't think we should split an event into more. The logic behind the event is "this fqdn is bad" and splitting the event would be misleading on the output. My opinion is - we should add new array attribute.

I do not have any particular event example, but any domain with more IPs will do, sorry google:

Non-authoritative answer:
Name:   google.com
Address: 173.194.123.72
Name:   google.com
Address: 173.194.123.68
Name:   google.com
Address: 173.194.123.73
Name:   google.com
Address: 173.194.123.67
Name:   google.com
Address: 173.194.123.69
Name:   google.com
Address: 173.194.123.65
Name:   google.com
Address: 173.194.123.70
Name:   google.com
Address: 173.194.123.66
Name:   google.com
Address: 173.194.123.71
Name:   google.com
Address: 173.194.123.78
Name:   google.com
Address: 173.194.123.64

@e3rd
Copy link
Member

e3rd commented Oct 22, 2015

What about 'forward_dns' to be the name? Note that 'reverse_dns' exists just for the opposite case.

@aaronkaplan
Copy link
Member

On 22 Oct 2015, at 15:39, Robert Šefr notifications@github.com wrote:

Array is an obvious solution, and although I'm not a fan of adding new attributes, I don't think we should split an event into more. The logic behind the event is "this fqdn is bad" and splitting the event would be misleading on the output. My opinion is - we should add new array attribute.

I do not have any particular event example, but any domain with more IPs will do, sorry google:

Got it. Okay, I came across the same problem once when thinking about pDNS.
So, if we have an array, then potentially we have a very large array.
Still I prefer an array to splitting the event.

Non-authoritative answer:
Name: google.com
Address: 173.194.123.72
Name: google.com
Address: 173.194.123.68
Name: google.com
Address: 173.194.123.73
Name: google.com
Address: 173.194.123.67
Name: google.com
Address: 173.194.123.69
Name: google.com
Address: 173.194.123.65
Name: google.com
Address: 173.194.123.70
Name: google.com
Address: 173.194.123.66
Name: google.com
Address: 173.194.123.71
Name: google.com
Address: 173.194.123.78
Name: google.com
Address: 173.194.123.64


Reply to this email directly or view it on GitHub.

@aaronkaplan
Copy link
Member

On 22 Oct 2015, at 15:42, e3rd notifications@github.com wrote:

What about 'forward_dns' to be the name? Note that 'reverse_dns' exists just for the opposite case.

Makes sense for me as well.

@sebix sebix added feature request Indicates new feature requests component: bots labels Oct 27, 2015
@e3rd
Copy link
Member

e3rd commented Nov 2, 2015

I've been trying to implement this, however, when configuring forward_dns in harmonization.conf, I am unable to set the type as "list". I'd like to put it as "list of IPAddress" but this seems to not be possible.
I have to set forward_dns as String and join the list of IPs to the signle String.

There is no "list" type option in harmonization, or am I blind?

@sebix
Copy link
Member

sebix commented Nov 3, 2015

@e3rd Yes this is correct. We had a discussion on a similar problem concerning email addresses (abuse contact), see #185. But this is a different case, as data is derived from IP addresses, but not from abuse contacts.

Alternative to lists: Clone the event and create duplicates for each address. I prefer this variant as I see severe issues when saving multiple IPs per event. Small example: Given is a domain used as C&C server or a websites which distributes malware. The FQDN resolves to multiple addresses in different AS' and countries. We do ASN and CC lookups, but how to save these informations? How to filter them? Having non-distinct data in such fundamental fields means events are not unique anymore. With multiple addresses per event, how to save data which depends on it? Lists of CCs, ASNs etc? Needs big adoptions everywhere.

For all others: The forward DNS bot proposal can be found here:

@robcza
Copy link
Contributor Author

robcza commented Nov 24, 2015

Ok, cloning the events makes sense. I agree with @sebix
@e3rd could you please adjust the bot accordingly?

@e3rd
Copy link
Member

e3rd commented Nov 24, 2015

Ok, I'll remake it and pull it here.

@e3rd
Copy link
Member

e3rd commented Nov 25, 2015

Interesting problem that I do not dare solve without your consent.
There may be M ip addresses related to source and N addresses related to the destination.
Should I make:
A) create lot of events: M × event (source.ip = ..., dest.ip = null) + N × event (source.ip = null, dest.ip = ...)
B) randomly map source to destination: M × event (source.ip = ..., dest.ip = ...) + (M-N) × event (source.ip = ..., dest.ip = null)
C) ...?

Did you get the point of the problem, am I clear?

@aaronkaplan
Copy link
Member

On 25 Nov 2015, at 12:28, e3rd notifications@github.com wrote:

Interesting problem that I do not dare solve without your consent.
There may be M ip addresses related to source and N addresses related to the destination.
Should I make:
A) create lot of events: M × event (source.ip = ..., dest.ip = null) + N × event (source.ip = null, dest.ip = ...)
B) randomly map source to destination: M × event (source.ip = ..., dest.ip = ...) + (M-N) × event (source.ip = ..., dest.ip = null)
C) ...?

Did you get the point of the problem, am I clear?

I understand and I am not sure if it’s solvable.
I believe we are missing information here (e.g. net flow data which would prove which src ip talked to which dst ip).
Inventing an event is probably not a good solution.

It’s a bigger architecture discussion IMHO. Let’s have a call on this.

Best,
a.

@sebix sebix added this to the Release 2 - v1.1 milestone Feb 22, 2016
@aaronkaplan
Copy link
Member

will be looked at in Release-2 or -3

@ghost ghost added this to To Do in CEF3-Act4-new experts Dec 19, 2017
@ghost ghost modified the milestones: 1.1.0, More bots and feeds Jun 4, 2018
@ghost ghost modified the milestones: More bots and feeds, 2.1.0 Oct 10, 2019
@ghost ghost self-assigned this Oct 10, 2019
@ghost ghost modified the milestones: 2.1.0, 2.2.0 Oct 25, 2019
@e3rd
Copy link
Member

e3rd commented Mar 3, 2020

I think this is partly covered by Gethostbyname bot and we may close this issue. In most of the cases, single IP address produced from a FQDN is enough.

@ghost ghost closed this as completed Jun 17, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

4 participants