Possible DNS-rebind attack detected

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
scope2
DD-WRT User


Joined: 12 Jul 2017
Posts: 181

PostPosted: Fri Apr 22, 2022 15:35    Post subject: Possible DNS-rebind attack detected Reply with quote
My log is being flooded with the following line:

daemon.warn dnsmasq[10819]: possible DNS-rebind attack detected: dns.msftncsi.com
(always this address)

I have only noticed since upgrading to the recent firmware, but might have been there prior to this aswell (I just didnt notice/check).

I have tried to read up on it and initially thought perhaps it was my pi-hole that caused these rebind messages, but I have turned it off, and the entries are still finding their way in the log.

How can I:

1) correct the "issue"
2) atleast stop them from being logged as I am getting pages and pages with this stuff, making it harder to focus on whats actually going on.
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14221
Location: Texas, USA

PostPosted: Fri Apr 22, 2022 17:47    Post subject: Reply with quote
Not knowing your specific setup and configurations, I can only guess there is a misconfiguration somewhere causing this. That host is specific to Windows' internal internet connectivity check; more stupid sh*t M$ added that is completely unnecessary. If you are using a Pi-Hole, then DD-WRT shouldn't be serving your DNS queries.

Sticky: use Pi-Hole as simple DNS-Server with DD-WRT

Discussion Thread Pi-Hole Sticky

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
scope2
DD-WRT User


Joined: 12 Jul 2017
Posts: 181

PostPosted: Fri Apr 22, 2022 17:49    Post subject: Reply with quote
I'm only using pi hole for a couple of devices, but i will check the windows machines not using it to see if they are configured wrong.
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Fri Apr 29, 2022 17:09    Post subject: Reply with quote
dns.msftncsi.com is used by windows to determine if an internet connection exists and set the adapter status accordingly, pi-hole or not it will happen. However pi-hole may make situation worse, no idea, I have max 5 entries in the routers log without pi-hole.

You can script something to grep these lines on the /var/log/messages and run every x minutes via cron and delete all such entries, idk any other way to cleanup the logs otherwise.

Of course you can disable on router under services tab > Dnsmasq section disable No DNS Rebind iirc. Not recommended as a this currently is a false positive and if you disable that, these entries will disapear from log and non false positives will also not be logged as a result.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Sat Apr 30, 2022 7:20    Post subject: Reply with quote
Code:
name:dns.msftncsi.com
address:fd3e:4f5a:5b81:0:0:0:0:1


DNS queries on the host result in a private IPv6 address (Unique Local Addresses (ULA)) which should trigger the DNS rebind protection.

So it has nothing to do with the Pi-Hole at all.

as already mentioned just ignore it
otherwise there are only the following possibilities.

1. filter syslog
2. disable "No DNS Rebind"
3. disable IPv6

Solution to 1.
just add a cron job in WebIF > Administration

Code:
*/5 * * * * root sed -i -e '/dns.msftncsi.com/d' /tmp/var/log/messages


this deletes all "dns.msftncsi.com" entries every 5min (for 10min just replace the 5 with a 10)

best regards
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12887
Location: Netherlands

PostPosted: Sat Apr 30, 2022 7:24    Post subject: Reply with quote
How about (added in DNSMasq additonal config):
Code:
rebind-domain-ok=/dns.msftncsi.com/


Will that work?

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
ho1Aetoo
DD-WRT Guru


Joined: 19 Feb 2019
Posts: 2977
Location: Germany

PostPosted: Sat Apr 30, 2022 7:45    Post subject: Reply with quote
Yes, this is also possible.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum