MikroTik authentication revealed
margin.re
margin.re
One of these protocols, MAC-telnet, has been reverse-engineered pretty extensively previously. But, due to a (not unreasonable) security-related upgrade, the login phase was changed, and 3rd-party implementations stopped working. Mikrotik has refused repeated requests to document this protocol.
The linked repository looks like it may re-enable MAC-telnet logins, which would be great for 3rd-party scripts and management solutions.
(Why? Because it allows you to connect to, and properly provision, any Mikrotik gear using your own scripts, just based on Layer-2 presence. This is very cool for many use cases...)
Then out of curiosity, do I understand correctly that these types of packets are bridged, not routed, and as such doesn’t work if you’re not in the same subnet?
[0] Broadcast segment would be the more accurate term here, given that subnet generally refers to layer 3 addressing mechanics. Technically a broadcast segment can contain more than one operational IP subnet, but this is uncommon on most user networks.
So the IP addresses can be something invalid like 0.0.0.0, in which case you both need to be on the same L2 segment (bridged). But, it's also entirely possible to use valid IP source/destination addresses (which don't need to be exactly your addresses, just a combination that works in both directions across any routers involved, so Ethernet packets end up on the right segment -- this requires some NAT tricks, but in the end it does work...) for the same protocol to work in a L3 environment. Also, on an all-Mikrotik network, there's https://help.mikrotik.com/docs/display/ROS/RoMON, which, once you set it up, allows for even more interesting traffic flows.
My use case for MAC-telnet is "remote hands" provisioning of new/replacement routers and switches. The only thing the local IT resource needs to be able to do, is connect the equipment to a correct uplink port, after which things will usually work (if not, a factory defaults reset may be required).
At the moment, some minor manual configuration work using another Mikrotik box is still required to enable IPv6 and configure the correct VLAN, after which my scripts take over. If MAC-telnet authentication can now be automated as well (and testing that is next on my to-do list...), provisioning could be fully automated in most cases.
That's a surprising twist. They duplicated the protocol from this unfinished draft almost exactly, but the draft doesn't appear to have gone anywhere (hence the archive link)
I wonder if the same person who wrote the paper consulted on this implementation, or if the MikroTik team just saw the paper at some point and decided to use it.
Does anyone know why this is? I've never been closely involved in the RFC process; is there some hard-to-clear hurdle at the end of it?
Maybe it was just a solution looking for a problem at the time of its proposal? Honestly, I'm not sure exactly whether the exotic encryption choices (strange, little-used elliptic curves, etc.) actually add much security, or if they're window dressing.
It’s a shame because their hardware seems great for the price point (especially their point to point mmWave gear)
And not just "insecure" libraries etc, just... strange design decisions. For example, SwitchOS doesn't allow configuration of a default gateway on the management interface, instead it just returns the request on whatever interface/vlan it gets it from. It leads to some very very strange behaviour when setting up firewall rules...
It's a shame, because the hardware is absolutely brilliant. I just wish they would open enough of their bootloader/hardware platform to allow 3rd party firmware to run easily.
You can't assume that all of the features from upstream are in whatever they put in RouterOS.
For example, OpenVPN UDP support was finally added to the stable stream this year after 10 years of asking about it.
This, including a couple of other issues, is keeping me from adapting mikrotik for anything more then a homelab.
But for about $130 the speed and stability blows away any equivalent-priced consumer technology with the added bonus of being much more configurable.
Network hardware should be rock solid appliances that live up to their specs on every front that I can just set and forget, and maybe occasionally need to do a security update. I shouldn't have to think of the pros and cons of one firmware choice over another, I don't have time for that crap.
Just make a fully-featured switch and fully-featured router and release them as such, instead of a crippled SwitchOS and crippled RouterOS, neither of which live up to the hardware's full potential.
https://openwrt.org/toh/start?dataflt%5BBrand*%7E%5D=MikroTi...
I still enjoy my little Edgerouter-X SFP, it's fast, compact, power efficient and I can plug my fiber internet connection straight into the SFP slot. Management can be done via SSH. What's not to like?
Edit: and yes, I know the edgerouters are still listed in the ubnt shop, but they have been 'sold out' for the past 3 years now. I don't think they'll ever return.
Another option if you don't need tremendous performance is https://pcengines.ch/ which also runs OpenBSD very well.
Immediate experience has been so so - the router kept rebooting every 12 hours - had to disable the AX interface and keep it wired only. WiFi is currently coming through a Netgear AC access point, which defeats the purpose of the system. I'm thinking if I should switch manufacturers before I get in too deep...
https://openwrt.org/toh/mikrotik/rb2011
1 - To what extent this makes Mikrotik hardware less secure? -> solutions?
2 - Does this make easier to flash open 3rd party Linux/BSD/whatever based firmware on said devices? -> suggestions?
A1. From a cryptography perspective it's a little bonkers but nothing is glaringly wrong.
A2. This doesn't relate to any secure boot chains (if they exist -- i don't think they do)
You also give a github link, but that's shared probably just same random github user, not by Microtik so there is even less evidence that it's complete.and correct.