I know Tim & I have been discussing this elsewhere but good to see a thread started here.
I’ll share what I know so far, having had some of our own clients’ routers experience the same attack last night.
The attacker is managing to log in via SSH as user ‘admin’. There were zero failed login attempts by this IP before the successful one was recorded, so the password was not brute-forced, and the ‘admin’ password was different on the different routers I know of that got hit, so it couldn’t have been known/obtained ahead of time, either. So it seems that either there is a vulnerability that is allowing one to achieve SSH login with ‘admin’ credentials and an unknown password, or that the attacker is managing to obtain the admin password from the router itself via an exploit to some other service (probably outside of SSH).
That last part shouldn’t be possible if you are running 6.45, because CVE-2018-14847 is closed in that version/branch, and supposedly routers upgraded to that version will also have the old password store that uses reversible encryption deleted, so even if the password file was obtained, it only contains non-reversible hashes now.
But we have seen at least one 6.45 router successfully attacked.
Here are the SSH log entries we see; the source IP for these is the same across all routers we’ve seen the log entries on, but different from the one that the injected rules are redirecting DNS requests to:
oct/15 23:48:58 system,info,account user admin logged in from 109.251.192.80 via ssh oct/15 23:49:01 system,info filter rule added by admin oct/15 23:49:01 system,info nat rule added by admin oct/15 23:49:01 system,info nat rule added by admin oct/15 23:49:01 system,info,account user admin logged out from 109.251.192.80 via ssh
It seems that most of the routers we have encountered this on were attacked shortly before 23:00 PDT (GMT -0700) …the timezone on the router that I took the above log entries from is set incorrectly.
Some routers were logged into more than once and had the same firewall filter & NAT rules added more than once. So this is surely some bot that is connecting to seemingly random IPs.
As you can see, the bot added 3 firewall rules. The one added to firewall filters is just a basic “chain=forward action=accept” rule. Besides the NAT rule that redirects DNS to that Bulgarian IP, the bot also adds a simple “chain=srcnat action=masquerade” rule as well:
/ip firewall filter add action=accept chain=forward /ip firewall nat add action=dst-nat chain=dstnat dst-port=53 protocol=udp to-addresses=185.117.88.13 to-ports=53 add action=masquerade chain=srcnat
These are the only settings that the bot touches.