Re: Logging on a Bind server

2020-10-22 Thread Tony Finch
senthan.sivasunda...@szkb.ch  wrote:

> One Day it came an alert from Cybereason (Antivirus-Software), that our
> Bind server tried to Connect to a suspicious domain "ns2.honeybot.us".

> But I couldn't find the log, which domain the BIND server was searching
> for, so that the BIND server has to connect to "ns2.honeybot.us". I can
> see the Queries log, which domain the Clients were querying but I
> couldn't find out why our Bind Server tried to connect the name server
> "ns2.honeybot.us".

There are a few ways to get answers to questions like this:

1. passive DNS, which captures cache-miss query traffic from a resolver to
the big bad internet. There are two flavours:

1a. a tcpdump tap between the resolver and the internet - the classic
passive DNS setup

1b. use dnstap, which is built-in to BIND

In both cases you will be logging a LOT so it requires sysadmin work: log
rotation, matching log volume to disk space, etc. usw. If you have good
passive DNS collection and analysis tools you can learn a lot about the
weirdness happening on your network. I don't, so I am blissfully unaware,
until I...

2. run `rndc dumpdb` and inspect the contents of named_dump.db

You might (if you are lucky) be able to run this after something happened
that caused questions, without any prior setup work, and maybe get an
answer if the TTLs are long enough.

In this particular case you'll be looking for records like " NS
ns2.honeybot.us". BIND prints named_dump.db in classic zone file format,
without repeating the owner name for every record, so once you have found
an NS record of interest you will need to scroll back to find a sibling
record that has the relevant owner name. So `less` is a better tool than
`grep` for this job.

Tony.
-- 
f.anthony.n.finchhttp://dotat.at/
Sole: Variable 4 at first in east, otherwise westerly or southwesterly 4 to 6,
occasionally 7 later in west. Moderate or rough, occasionally very rough later
in west. Rain or showers. Good, occasionally moderate.
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Logging on a Bind server

2020-10-21 Thread Borja Marcos



> On 20 Oct 2020, at 18:02, Chuck Aurora  wrote:
> 
> On 2020-10-20 10:34, Borja Marcos wrote:
>>> On 20 Oct 2020, at 17:28, Rick Dicaire  wrote:
>>> On Tue, Oct 20, 2020 at 10:17 AM  wrote:
>>> Dear BIND-Users,
>>> Does someone has an idea, which log I have to activate.
> 
> While everything Borja says below, and what Kevin said in the other
> subthread, is absolutely true, in this case I am not sure these are
> the best answers. :)
> 
> I would suggest to the OP that you go to your software vendor and ask
> exactly why you should be concerned about queries going to that
> particular server.  Demand detailed information, which should be a
> reasonable thing, given what your company is paying them.

Of course :) Anyway, gaining the capability of tracing a DNS query so that you
know which clients started it can be extremely valuable.




Borja.


___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Logging on a Bind server

2020-10-20 Thread Chuck Aurora

On 2020-10-20 10:34, Borja Marcos wrote:

On 20 Oct 2020, at 17:28, Rick Dicaire  wrote:

On Tue, Oct 20, 2020 at 10:17 AM  wrote:
Dear BIND-Users,

Does someone has an idea, which log I have to activate.


While everything Borja says below, and what Kevin said in the other
subthread, is absolutely true, in this case I am not sure these are
the best answers. :)

I would suggest to the OP that you go to your software vendor and ask
exactly why you should be concerned about queries going to that
particular server.  Demand detailed information, which should be a
reasonable thing, given what your company is paying them.

In some cases, such vendors are frauds.  Note, I have no inside
information about Cybereason nor ns2.honeybot.us, so the warning could
very well be a valid concern.  But I wouldn't recommend going to all
this trouble without knowing details of why to worry.

And then rather than dnstap/logging, I'd probably follow Kevin's
advice about RPZ, if it turned out to be a valid concern.  I think if
your vendor is as good as you hope they are (and as they surely claim
to be) they would have information about setting up RPZ.



Do you have querylog enabled?


Querylog is not enough. It will tell you which clients are sending
which queries, but not which queries go to the Server Of Interest.
It won’t log the queries the recursive server sends itself.

That’s a good use case for dnstap.

As a sort of desperate measure you can capture packets sent to the
suspicious IP addresses (no need to put the interface in promisc
mode) and check which queries were sent to them.

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Logging on a Bind server

2020-10-20 Thread Kevin Darcy
[ Classification Level: GENERAL BUSINESS ]

Sorry to follow up on my own post, but I feel I should add a caveat about
blocking IPs -- the resolution of ns2.honeypot.us could *change* over time,
so an IP-based block might not be effective in the long term, and in fact
might cause more harm than good.

If you truly want to block any communication with ns2.honeypot.us by
*name*, permanently, you'd probably have to go to the extreme of creating a
zone for just that particular name, resolve it to 0.0.0.0, something of
that nature.

In the larger picture, you might want to consider, instead, a dynamic,
reputation-based RPZ feed. See https://dnsrpz.info/ for more.

- Kevin

On Tue, Oct 20, 2020 at 10:45 AM Kevin Darcy 
wrote:

> [ Classification Level: GENERAL BUSINESS ]
>
> According to securitytrails.com (for instance), there are over 3,000
> domains hosted on ns2.honeybot.us (securitytrails only shows the first
> few domains hosted -- to see more, one presumably needs a subscription to
> their service).
>
> If one of your clients looked up a name in one of those 3,000+ domains,
> your BIND instance will potentially reach out to that nameserver to resolve
> the name.
>
> As far as BIND logging, I don't know the best way to track this, offhand,
> short of cranking up debug to ridiculous levels, and wading through the
> verbose output. This might take significant resources (storage, CPU, etc.)
>
> It might be easier to run a packet capture, looking for something sent to
> the specific IP associated with ns2.honeybot.us. Or, if you have a robust
> Intrusion Prevention/Detection System (IPS or IDS), maybe configure an
> "alert" rule for that destination IP. For either option, it might also be
> interesting to see the response from ns2.honeybot.us, to check for
> shenanigans.
>
> If you just want to mitigate any danger, and are willing to deal with any
> fallout, you could just block the IP, on your firewall or IPS or with
> BIND's "blackhole" feature.
>
>   - Kevin
>
> On Tue, Oct 20, 2020 at 10:17 AM  wrote:
>
>> Dear BIND-Users,
>>
>> We use in our environment a BIND Server. It works properly.
>> One Day it came an alert from Cybereason (Antivirus-Software), that our
>> Bind server tried to Connect to a suspicious domain "ns2.honeybot.us".
>> But I couldn’t find the log,  which domain the BIND server was searching
>> for, so that the BIND server has to connect to "ns2.honeybot.us". I can
>> see the Queries log, which domain the Clients were querying but I couldn’t
>> find out why our Bind Server tried to connect the name server "
>> ns2.honeybot.us".
>>
>> Does someone has an idea, which log I have to activate.
>>
>> Thank you for your help in advance.
>>
>> Best Regards
>> Senthan
>>
>> --
>>
>> Schwyzer Kantonalbank
>>
>> Senthan Sivasundaram
>>
>> IT Systems
>>
>> Postfach 263
>>
>> 6431 Schwyz
>>
>>
>>
>> Tel. +41 (0)58 800 29 88
>>
>> Fax +41 (0)58 800 20 21
>>
>> senthan.sivasunda...@szkb.ch
>>
>> www.szkb.ch
>>
>>
>>
>> [image: http://www.szkb.ch/files/png1/facebook.png]
>>   [image:
>> http://www.szkb.ch/files/png1/xing.png]
>>   [image:
>> http://www.szkb.ch/files/png1/youtube.png]
>> 
>>
>>
>>
>>
>> Gut beraten, Schwyzer Art. - SZKB-Newsletter abonnieren
>> 
>>
>>
>> Aufgrund der bisherigen E-Mail-Korrespondenz bzw. getroffener Absprachen,
>> erachtet sich die SZKB als berechtigt, mit Ihnen per E-Mail zu
>> kommunizieren. Die SZKB geht davon aus, dass Sie die Risiken von E-Mails
>> kennen und in Kauf nehmen. So sind namentlich gewöhnliche,
>> unverschlüsselte, E-Mails, die über das Internet gesendet werden, weder
>> vertraulich noch sicher. Es besteht die Gefahr von Manipulation oder
>> Missbrauch durch Dritte, Fehlleitung, verzögerte Übermittlung oder
>> Bearbeitung, Anhang von Viren, Malware usw. Die SZKB lehnt jede Haftung für
>> Schäden im Zusammenhang mit der Verwendung von E-Mails ab, sofern sie die
>> geschäftsübliche Sorgfalt nicht verletzt hat.
>>
>> E-Mails werden nur während den üblichen Geschäftszeiten der SZKB
>> bearbeitet. Sie können nicht von der sofortigen Kenntnisnahme Ihrer E-Mail
>> ausgehen. Die SZKB ist grundsätzlich nicht verpflichtet, Aufträge oder
>> Anweisungen, die per E-Mail erteilt werden, auszuführen, ausser dies wurde
>> ausdrücklich vereinbart. Falls Sie diese E-Mail irrtümlich erhalten haben,
>> ersuchen wir Sie, die E-Mail an den Absender zurückzusenden und die
>> Nachricht mit allen Anhängen von ihrem System zu löschen.
>>
>>
>>   Bitte denken Sie an die Umwelt - drucken Sie diese E-Mail nicht aus und
>> sparen Sie pro Seite 100 ml Wasser, 7 g CO2 und 11 g Holz.
>>
>> Gut beraten, Schwyzer Art. - SZKB-Newsletter abonnieren
>> 

Re: Logging on a Bind server

2020-10-20 Thread Borja Marcos


> On 20 Oct 2020, at 17:28, Rick Dicaire  wrote:
> 
> On Tue, Oct 20, 2020 at 10:17 AM  wrote:
> Dear BIND-Users,
> 
> Does someone has an idea, which log I have to activate.
> 
> 
> Do you have querylog enabled? 

Querylog is not enough. It will tell you which clients are sending which 
queries, but not which queries
go to the Server Of Interest. It won’t log the queries the recursive server 
sends itself.

That’s a good use case for dnstap. 

As a sort of desperate measure you can capture packets sent to the suspicious 
IP addresses (no need to
put the interface in promisc mode) and check which queries were sent to them. 






Borja.

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Logging on a Bind server

2020-10-20 Thread Rick Dicaire
On Tue, Oct 20, 2020 at 10:17 AM  wrote:

> Dear BIND-Users,
>
> Does someone has an idea, which log I have to activate.
>

Do you have querylog enabled?
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Logging on a Bind server

2020-10-20 Thread Kevin Darcy
[ Classification Level: GENERAL BUSINESS ]

According to securitytrails.com (for instance), there are over 3,000
domains hosted on ns2.honeybot.us (securitytrails only shows the first few
domains hosted -- to see more, one presumably needs a subscription to their
service).

If one of your clients looked up a name in one of those 3,000+ domains,
your BIND instance will potentially reach out to that nameserver to resolve
the name.

As far as BIND logging, I don't know the best way to track this, offhand,
short of cranking up debug to ridiculous levels, and wading through the
verbose output. This might take significant resources (storage, CPU, etc.)

It might be easier to run a packet capture, looking for something sent to
the specific IP associated with ns2.honeybot.us. Or, if you have a robust
Intrusion Prevention/Detection System (IPS or IDS), maybe configure an
"alert" rule for that destination IP. For either option, it might also be
interesting to see the response from ns2.honeybot.us, to check for
shenanigans.

If you just want to mitigate any danger, and are willing to deal with any
fallout, you could just block the IP, on your firewall or IPS or with
BIND's "blackhole" feature.

  - Kevin

On Tue, Oct 20, 2020 at 10:17 AM  wrote:

> Dear BIND-Users,
>
> We use in our environment a BIND Server. It works properly.
> One Day it came an alert from Cybereason (Antivirus-Software), that our
> Bind server tried to Connect to a suspicious domain "ns2.honeybot.us".
> But I couldn’t find the log,  which domain the BIND server was searching
> for, so that the BIND server has to connect to "ns2.honeybot.us". I can
> see the Queries log, which domain the Clients were querying but I couldn’t
> find out why our Bind Server tried to connect the name server "
> ns2.honeybot.us".
>
> Does someone has an idea, which log I have to activate.
>
> Thank you for your help in advance.
>
> Best Regards
> Senthan
>
> --
>
> Schwyzer Kantonalbank
>
> Senthan Sivasundaram
>
> IT Systems
>
> Postfach 263
>
> 6431 Schwyz
>
>
>
> Tel. +41 (0)58 800 29 88
>
> Fax +41 (0)58 800 20 21
>
> senthan.sivasunda...@szkb.ch
>
> www.szkb.ch
>
>
>
> [image: http://www.szkb.ch/files/png1/facebook.png]
>   [image:
> http://www.szkb.ch/files/png1/xing.png]
>   [image:
> http://www.szkb.ch/files/png1/youtube.png]
> 
>
>
>
>
> Gut beraten, Schwyzer Art. - SZKB-Newsletter abonnieren
> 
>
>
> Aufgrund der bisherigen E-Mail-Korrespondenz bzw. getroffener Absprachen,
> erachtet sich die SZKB als berechtigt, mit Ihnen per E-Mail zu
> kommunizieren. Die SZKB geht davon aus, dass Sie die Risiken von E-Mails
> kennen und in Kauf nehmen. So sind namentlich gewöhnliche,
> unverschlüsselte, E-Mails, die über das Internet gesendet werden, weder
> vertraulich noch sicher. Es besteht die Gefahr von Manipulation oder
> Missbrauch durch Dritte, Fehlleitung, verzögerte Übermittlung oder
> Bearbeitung, Anhang von Viren, Malware usw. Die SZKB lehnt jede Haftung für
> Schäden im Zusammenhang mit der Verwendung von E-Mails ab, sofern sie die
> geschäftsübliche Sorgfalt nicht verletzt hat.
>
> E-Mails werden nur während den üblichen Geschäftszeiten der SZKB
> bearbeitet. Sie können nicht von der sofortigen Kenntnisnahme Ihrer E-Mail
> ausgehen. Die SZKB ist grundsätzlich nicht verpflichtet, Aufträge oder
> Anweisungen, die per E-Mail erteilt werden, auszuführen, ausser dies wurde
> ausdrücklich vereinbart. Falls Sie diese E-Mail irrtümlich erhalten haben,
> ersuchen wir Sie, die E-Mail an den Absender zurückzusenden und die
> Nachricht mit allen Anhängen von ihrem System zu löschen.
>
>
>   Bitte denken Sie an die Umwelt - drucken Sie diese E-Mail nicht aus und
> sparen Sie pro Seite 100 ml Wasser, 7 g CO2 und 11 g Holz.
>
> Gut beraten, Schwyzer Art. - SZKB-Newsletter abonnieren
> 
>
>
> Aufgrund der bisherigen E-Mail-Korrespondenz bzw. getroffener Absprachen,
> erachtet sich die SZKB als berechtigt, mit Ihnen per E-Mail zu
> kommunizieren. Die SZKB geht davon aus, dass Sie die Risiken von E-Mails
> kennen und in Kauf nehmen. So sind namentlich gewöhnliche,
> unverschlüsselte, E-Mails, die über das Internet gesendet werden, weder
> vertraulich noch sicher. Es besteht die Gefahr von Manipulation oder
> Missbrauch durch Dritte, Fehlleitung, verzögerte Übermittlung oder
> Bearbeitung, Anhang von Viren, Malware usw. Die SZKB lehnt jede Haftung für
> Schäden im Zusammenhang mit der Verwendung von E-Mails ab, sofern sie die
> geschäftsübliche Sorgfalt nicht verletzt hat.
>
> E-Mails werden nur während den üblichen Geschäftszeiten der SZKB
> bearbeitet. Sie können nicht von der sofortigen Kenntnisnahme Ihrer 

Logging on a Bind server

2020-10-20 Thread Senthan.Sivasundaram
Dear BIND-Users,
We use in our environment a BIND Server. It works properly.
One Day it came an alert from Cybereason (Antivirus-Software), that our Bind 
server tried to Connect to a suspicious domain "ns2.honeybot.us".
But I couldn't find the log,  which domain the BIND server was searching for, 
so that the BIND server has to connect to "ns2.honeybot.us". I can see the 
Queries log, which domain the Clients were querying but I couldn't find out why 
our Bind Server tried to connect the name server "ns2.honeybot.us".

Does someone has an idea, which log I have to activate.

Thank you for your help in advance.

Best Regards
Senthan
--
Schwyzer Kantonalbank
Senthan Sivasundaram
IT Systems
Postfach 263
6431 Schwyz

Tel. +41 (0)58 800 29 88
Fax +41 (0)58 800 20 21
senthan.sivasunda...@szkb.ch
www.szkb.ch

[http://www.szkb.ch/files/png1/facebook.png]  
[http://www.szkb.ch/files/png1/xing.png] 
   
[http://www.szkb.ch/files/png1/youtube.png] 



Gut beraten, Schwyzer Art. - SZKB-Newsletter 
abonnieren


Aufgrund der bisherigen E-Mail-Korrespondenz bzw. getroffener Absprachen, 
erachtet sich die SZKB als berechtigt, mit Ihnen per E-Mail zu kommunizieren. 
Die SZKB geht davon aus, dass Sie die Risiken von E-Mails kennen und in Kauf 
nehmen. So sind namentlich gewöhnliche, unverschlüsselte, E-Mails, die über das 
Internet gesendet werden, weder vertraulich noch sicher. Es besteht die Gefahr 
von Manipulation oder Missbrauch durch Dritte, Fehlleitung, verzögerte 
Übermittlung oder Bearbeitung, Anhang von Viren, Malware usw. Die SZKB lehnt 
jede Haftung für Schäden im Zusammenhang mit der Verwendung von E-Mails ab, 
sofern sie die geschäftsübliche Sorgfalt nicht verletzt hat.

E-Mails werden nur während den üblichen Geschäftszeiten der SZKB bearbeitet. 
Sie können nicht von der sofortigen Kenntnisnahme Ihrer E-Mail ausgehen. Die 
SZKB ist grundsätzlich nicht verpflichtet, Aufträge oder Anweisungen, die per 
E-Mail erteilt werden, auszuführen, ausser dies wurde ausdrücklich vereinbart. 
Falls Sie diese E-Mail irrtümlich erhalten haben, ersuchen wir Sie, die E-Mail 
an den Absender zurückzusenden und die Nachricht mit allen Anhängen von ihrem 
System zu löschen.


[https://www.szkb.ch/files/png1/co2.png]  Bitte denken Sie an die Umwelt - 
drucken Sie diese E-Mail nicht aus und
sparen Sie pro Seite 100 ml Wasser, 7 g CO2 und 11 g Holz.

Gut beraten, Schwyzer Art. - SZKB-Newsletter 
abonnieren


Aufgrund der bisherigen E-Mail-Korrespondenz bzw. getroffener Absprachen, 
erachtet sich die SZKB als berechtigt, mit Ihnen per E-Mail zu kommunizieren. 
Die SZKB geht davon aus, dass Sie die Risiken von E-Mails kennen und in Kauf 
nehmen. So sind namentlich gewöhnliche, unverschlüsselte, E-Mails, die über das 
Internet gesendet werden, weder vertraulich noch sicher. Es besteht die Gefahr 
von Manipulation oder Missbrauch durch Dritte, Fehlleitung, verzögerte 
Übermittlung oder Bearbeitung, Anhang von Viren, Malware usw. Die SZKB lehnt 
jede Haftung für Schäden im Zusammenhang mit der Verwendung von E-Mails ab, 
sofern sie die geschäftsübliche Sorgfalt nicht verletzt hat.

E-Mails werden nur während den üblichen Geschäftszeiten der SZKB bearbeitet. 
Sie können nicht von der sofortigen Kenntnisnahme Ihrer E-Mail ausgehen. Die 
SZKB ist grundsätzlich nicht verpflichtet, Aufträge oder Anweisungen, die per 
E-Mail erteilt werden, auszuführen, ausser dies wurde ausdrücklich vereinbart. 
Falls Sie diese E-Mail irrtümlich erhalten haben, ersuchen wir Sie, die E-Mail 
an den Absender zurückzusenden und die Nachricht mit allen Anhängen von ihrem 
System zu löschen.



smime.p7s
Description: S/MIME cryptographic signature
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users