The router’s dnsmasq instance was accessible from the internet and therefore able to answer DNS requests from strangers. It shouldn’t have been able to do that if the firewall had been running correctly.What does it mean for his router answering DNS requests? How is that tested? Is this DNS for devices on his internal network?
Congratulations! You were running a real live honeypot there for a short while! LOLI've just become aware that my Asus RT-AX86U which is running the latest Merlin firmware (3004.388.9) might be compromised. Potentially by TheMoon malware or Alogin. I was made aware that port 53 is open, however, I don't have any port forwards enabled for 53 so I can't see why it would be open.
So just circling back after a few days to see if everything is ok. Having someone rescan my IP via TCP and UDP. TCP comes back the way I expect. However, running thisThat was probably the safest solution. Something was flushing the content of your INPUT chain. It wasn't a firewall rule error, because that would have prevented the whole firewall from being configured, not just the INPUT chain.
Just to be safe, use a different password for your router's admin access, in case it was somehow compromised.
nmap -sS -sU -T4 -A -v 101.100.xxx.xxx/32
OUTPUT_DNS
Discovered open port 53/udp on 101.100.xxx.xxx
Discovered open|filtered port 53/udp on 101.100.xxx.xxx is actually open
[13882:1034069] -A OUTPUT -p udp -m udp --dport 53 -m u32 --u32 "0x0>>0x16&0x3c@0x8>>0xf&0x1=0x0" -j OUTPUT_DNS
[0:0] -A OUTPUT -p tcp -m tcp --dport 53 -m u32 --u32 "0x0>>0x16&0x3c@0xc>>0x1a&0x3c@0x8>>0xf&0x1=0x0" -j OUTPUT_DNS
Yes this is normal.Had a look at iptables for port 53 stuff and I see this entry, but I can't make sense of it...just want to confirm that this is expected?
Code:[13882:1034069] -A OUTPUT -p udp -m udp --dport 53 -m u32 --u32 "0x0>>0x16&0x3c@0x8>>0xf&0x1=0x0" -j OUTPUT_DNS [0:0] -A OUTPUT -p tcp -m tcp --dport 53 -m u32 --u32 "0x0>>0x16&0x3c@0xc>>0x1a&0x3c@0x8>>0xf&0x1=0x0" -j OUTPUT_DNS
Port 53 is not normally open to the internet. What is 101.100.xxx.xxx? Where are you nmap'ing it from?Thanks @ColinTaylor - nmap has completed and the only thing was that port 53 being open....that's ok, too? Just wondering why it shows open on 53.
netstat -nlp | grep :53
101.100.xxx.xxx is my ip address, I was just obfuscating the address since it's static and I didn't want to publicly post it. I'll DM it to you though. I was having my friend who is a network security professional in the USA run nmap on my IP. He's not familiar with Merlin or Asus routers and works exclusively on enterprise grade network appliances so he was wondering why it was showing up that way in his nmap scan of my ipSSH into your router and post the output of this command:
Code:netstat -nlp | grep :53
admin@RT-AX86U-79A8:/tmp/home/root# netstat -nlp | grep :53
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3965/dnsmasq
tcp 0 0 192.168.1.1:53 0.0.0.0:* LISTEN 3965/dnsmasq
udp 0 0 127.0.0.1:53 0.0.0.0:* 3965/dnsmasq
udp 0 0 192.168.1.1:53 0.0.0.0:* 3965/dnsmasq
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2232/avahi-daemon:
admin@RT-AX86U-79A8:/tmp/home/root#
That all looks normal.Here's the output:
admin@RT-AX86U-79A8:/tmp/home/root# netstat -nlp | grep :53
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3965/dnsmasq
tcp 0 0 192.168.1.1:53 0.0.0.0:* LISTEN 3965/dnsmasq
udp 0 0 127.0.0.1:53 0.0.0.0:* 3965/dnsmasq
udp 0 0 192.168.1.1:53 0.0.0.0:* 3965/dnsmasq
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2232/avahi-daemon:
admin@RT-AX86U-79A8:/tmp/home/root#
tried to upgrade but I am being asked a bunch of questions and served a few pages of text to read and something about ID? what the heck is this? ASUS=spyware?I've just become aware that my Asus RT-AX86U which is running the latest Merlin firmware (3004.388.9) might be compromised. Potentially by TheMoon malware or Alogin. I was made aware that port 53 is open, however, I don't have any port forwards enabled for 53 so I can't see why it would be open.
This seems highly suspicious. Furthermore, it appears that I'm serving DNS because if I run dig as follows I get this result:
~$ dig +short @119.2xx.xxx.xxx google.com
142.251.221.78
That seems like it should not be happening and is a red flag to me.
Then if I look in IPTables I see some entries that look really suspect, too:
Code:Chain OUTPUT_IP (1 references) target prot opt source destination logdrop_ip all -- anywhere 193.201.224.0/24 logdrop_ip all -- anywhere 245-120-15-51.instances.scw.cloud logdrop_ip all -- anywhere li1019-134.members.linode.com logdrop_ip all -- anywhere 190.115.18.28 logdrop_ip all -- anywhere 51-159-52-250.rev.poneytelecom.eu logdrop_ip all -- anywhere 190.115.18.86
And this too:
Code:Chain PTCSRVWAN (0 references) target prot opt source destination DROP tcp -- 92.255.85.107 anywhere tcp dpt:ssh DROP tcp -- 92.255.85.253 anywhere tcp dpt:ssh DROP tcp -- 185.42.12.240 anywhere tcp dpt:ssh DROP tcp -- 92.255.85.37 anywhere tcp dpt:ssh DROP tcp -- 185.7.214.37 anywhere tcp dpt:ssh
I had a quick look for obvious signs of TheMoon in find/tmp and didn't see anything obvious - paste here https://pastebin.com/LR3CJzpf
Also, taking a look at the output of 'ps' I didn't see .nttpd or .sox running which is the normal culprit. Of course a newer/better variant of TheMoon might just be better disguising itself so here's my 'ps' output if anyone wants to look - https://pastebin.com/MiAHgyP4
I don't have my admin gui open to the WAN and never did so in the past. I do run IPsec and OpenVPN and I'm also seeing some suspicious login attempts via IPSec.
I'd really like to know what is going on and try to figure out the source/vector for this. I'm also unsure how to clean this up, but I suspect factory reset, flashing again and another factory reset should do the job?
Post a screen shot of what you are referencing or seeing so others can understand what you are talking about.tried to upgrade but I am being asked a bunch of questions and served a few pages of text to read and something about ID? what the heck is this? ASUS=spyware?
thank you bennor. i was up to date on my upgrades and have never seen these; only this last upgrade. I am going through the discussions now to have an idea what it is all about.Post a screen shot of what you are referencing or seeing so others can understand what you are talking about.
If you are talking about the End User License Agreement and the Asus Notice that appear when you first access the router's QiS page (either new) or after a reset, that is expected behavior. Asus started including the agreement notices last year. There is lots of prior discussion about the notices and option to either agree or disagree with them that can be found using the forum search feature.
What specific router and specific firmware are you running where you see these notices?The first notice is about age, what is this all about, years after owning the router? The second one I refused and saw some warning about google and some others;
That will not change anything on the router's behaviour beside Asus not telling you to accept what they may be collecting. The EULA does not indicate any change in behaviour, only that Asus are now asking for consent, to comply with some regional laws that are stricter. And since it's written by lawyers, they will try to be as broad as possible just to cover their asses.
The question is not whether someone wants to accept a EULA or not. The question is whether you want to accept what they _might_ be doing. And that hasn`t changed in these newer firmware releases.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!