RCE on MikroTik routers with IPv6 RA enabled
blog.mikrotik.com
blog.mikrotik.com
I'm evaluating their RUTX11 LTE/WiFi router as an in-vehicle router for a commercial application. I'm reasonably impressed so far. Their firmware strategy seems to be going for implementing every feature under the sun, so I'd be a bit concerned about the robustness of some of the edge cases, but no problems yet.
(This is not intended to imply "move off of MikroTik to Teltonika because of this security issue" at all, I just needed to get this out of my system)
I set up a wireguard tunnel from the RUT so I could have remote management to the rut and to the tieline gateway providing the comms over one of the sims, in addition to my normal tunnel from the mikrotik.
In Dover sim coverage was patchy, as was the "ethernet line" (which I believe was a 60G wireless link across the harbour). Just before the broadcast started the "ethernet" circuit dropped off, as did one of the sims. The other sim had fortunatly managed to connect to a French 4G provider.
Another location had issues with the venue internet so again rut to the rescue, but another location had no 4g coverage at all so wired did the job.
Those ruts are now on the way to be in use at a site near Poole to do 3 sim cards worth of connectivity to some remote locations. I really like the wireguard connection, makes it easy to see what's going, and they're a nice little box anyway.
Configuration isn't good though -- a mikrotik has a nice simple "/export terse" to see how it's configured and easilly apply. The Ruts config is spread all over the file system and it's not obvious to me yet how to manage that. There's some bugs in the gui too around routing tables too.
in what way ? If it is just "let's expose every feature of linux kernel underneath and add some" I wouldn't be worried. I think (not sure) RouterOS reimplemented a lot of networking for whatever reason instead of just using Linux facilities, and that bug would suggest that, as otherwise it would also show up in vanilla linux (I guess it could be in userspace tool not in kernel?)
> On a tangentially related note I recently found another manufacturer that is very similar to MikroTik: Teltonika.
How's CLI?
The one thing that makes me steer away from Mikrotik is its CLI. It is different enough from anything else networking and different from linux commands that I have zero intuition for it. So I just use plain linux
My go-to was PCEngines APU2 but AMD no longer supports/produces CPU it uses so it is near-discontinued
This is a bad mental model to use for Linux. The level of maturity generally has a direct relationship to the size of the user base. Stuff like MPLS support and tons of VRFs is not nearly as polished as something like basic routing+nat.
This extends beyond reliability to things like tooling for debugging. Some of the kernel networking features are nearly impossible to debug when they break without going into the kernel code and reading the source.
Vendor rep is important. I really don't trust Fortinet much anymore in moving off them, when they have security problems, they're usually pretty bad/catastrophic, and you NEVER want to NOT have updates on their kit if facing the internet (which mine was eos). Cisco isn't much better. I don't see Mikrotik in the news very often, which I'd take as a win at least and have compelling enough hardware/pricing I'd see this is a relatively small thing soon patched.
Some of the networks I work with have some older Mikrotik gear (which the Opnsense appliances are going to replace), I've just never really quite liked it - it has every feature under the sun but the interface always just seemed a bit janky to me. I might be judging a book by its cover but the software has just never felt solid...
For example, this router has a GPS antenna. https://wiki.teltonika-networks.com/view/RUTX11_GPS
Which of course means it can forward the NMEA data to a TCP server, and also cache it, and also log it to a file, and you can configure this all per-sentence type, and you can enable an HTTPS server to provide it, and it supports multiple AVL protocols for vehicle location tracking, and it has a rules engine, and a geofencing system, and it can trigger GPIO pin signals. I'm pretty sure it has an RTCM client as well but I can't find it mentioned on the wiki right now.
All of which is awesome if you want to use it as an integration point within a larger system, like I want to, assuming that those features actually work. I do not know either way.
These routers tend to be implemented with A proprietary GUI and a few proprietary daemons on top of OpenWRT and a bunch of bundled open source daemons. The Teltonica appears to be the same. This can work well but it gives me the heebie jeebies.
> How's CLI?
It's an OpenWRT shell, basically. Presumably they have commands to interact with whatever configuration system the GUI is using but I haven't checked.
They're also BPF/XDP compatible, though they obviously have no netronome smartNICs in there.
Also, golang can easily cross-compile to them, and the static binaries work without issues in case you want to do more with it :)
What I'm concerned about is if this is a Mikrotik-specific issue or - given that IIRC their RouterOS is essentially a specialized and highly customized GNU/Linux distribution (I could be wrong) - some issue in Linux kernel or radvd. Aka "should I worry about my own software routers, or if this is strictly about Mikrotik?"
Based on my conversations with people who have worked there- RouterOS is running on Linux kernel, but it's so heavily patched, that upgrades to newer version are.. delayed until the benefits of the upgrade exceeds the cost. Up until the release of RouterOS 7 (circa 2021-2022) it was running on Linux kernel 3.3 (of 2012 vintage).
The drawbacks to this may not be obvious at first, but e.g. Wireguard support took a few years.
> your cost of physically performing source distribution
and it must be distributed
> on a medium customarily used for software interchange
As a CD-ROM has not been customarily used for distributing this sort of software for many years(computers don't typically even have CD-ROM drives these days) this offer is clearly not GPL compliant.
I don't know why they wouldn't just push it to Github for free, though. Any competitor that wants to borrow their modifications will gladly cough up $45. So they're just making people mad for no reason.
Not that other networking companies are better in this regard, they just have been founded when OpenWRT was already around.
So not Linux kernel but possibly RADVD. No announcement from RADVD itself
ZDI have been doing disclosure since forever. I doubt Mikrotiks claim that they were never notified.
And PS: One of my routers that I just checked is running 7.9beta4, and the next available version (testing) is 7.10beta5. In the blog post they said that the fix is in 7.10beta7
https://www.reddit.com/r/mikrotik/comments/13oloi3/comment/j...
The result is that I use NixOS for my NAT gateway/firewall, and simply live without fancier network features (I only have two NICs in that machine).
For wifi I begrudgingly use an off-the-shelf wifi router combo in bridge mode.
Or install openwrt.
If you're not using Windows, WinBox will run just fine under Wine on Mac/Linux. That's how I run it.
Why, oh why do vendors decide to come up with their own mutually incompatible set of shell commands. And it's always so ugly compared to modern bash
My point is more that the web interface isn't the best option. Take your pick of the others. :)
I love the idea of scripting on a router, but please give us a real language to work with.
(Even more curiously, I seem to get a duplicate menu item every time I reboot - three of each now (6.something / 7.7 -> 7.7 / 7.91 -> 7.9.1 reboots) ..almost in order - some of them seem to be somehow grouped for ordering purposes (and so are repeated as a group, not individually) despite not being nested or even obviously related.)
>> The version of the RouterBOOT loader is currently in use. Not to be confused with RouterOS operating system version.
IMHO it's disturbing that any component of the IPv6 stack can be exploited even with /ipv6/settings/disable-ipv6 yes
There also seems to be a disagreement between Mikrotik and the researchers about whether the vuln was actually disclosed in Dec. Hopefully some more info comes out regarding that.
You are only affected if one of the below settings is applied:
ipv6/settings/ set accept-router-advertisements=yes
or
ipv6/settings/set forward=no accept-router-advertisements=yes-if-forwarding-disabled
Specifically I'd like to know whether this config is vulnerable: /ipv6/settings/set disable-ipv6=yes forward=no accept-router-advertisements=yes-if-forwarding-disabledI had
/ipv6/settings/print
disable-ipv6: no
forward: yes
accept-redirects: yes-if-forwarding-disabled
accept-router-advertisements: yes-if-forwarding-disabled
max-neighbor-entries: 8192
which I interpreted as "maybe" being ok? But I upgraded anyway.It seems likely that it was not properly disclosed because according to https://mikrotik.com/supportsec "you will be notified within 48 hours with acknowledgement of the issue" , but the reporter's web site states "ZDI reported the vulnerability to the vendor during Pwn2Own Toronto". According to MT, none of their staff attended that event.
Google for "icmpv6 vulnerability" ... There is just so many bad neighbor discovery related RCEs, it makes my heart bleed.
Even tcpdump was too naively implemented at some point.
Except for a black hat with a MikroTik name badge and handing out merch. Cunning, no?
Is this not a legitimate inquiry? Just curious why this leads to being quickly downvoted.
However, I turn off ipv6 in my internal network.
fyi I mainly use rb3011 routers and this branch:
https://github.com/adron-s/openwrt-rb3011
EDIT: yes, I understand this is only tangentially related to the routeros ipv6 ra cve