Does not appear so looking at the other posts. One failed attempt was in the logs...I use firewall rules which will kick an IP address if login fails after three attempts. Will this method be sufficient to be protected from this vulnerability?
They gain access on a file within the router, right? What kind of information is stored in there?How it works: The vulnerability allowed a special tool to connect to the Winbox port, and request the system user database file.
No, that's a different vulnerability in the SMB service.
Normis, it seems this not help.As an alternative, possibly easier, use the "IP -> Services" menu to specify "Allowed From" addresses. Include your LAN, and the public IP that you will be accessing the device from.[/b]
You don't know what is stored in the system user database file ????They gain access on a file within the router, right? What kind of information is stored in there?How it works: The vulnerability allowed a special tool to connect to the Winbox port, and request the system user database file.
No, do you? I f so let me knowYou don't know what is stored in the system user database file ????They gain access on a file within the router, right? What kind of information is stored in there?How it works: The vulnerability allowed a special tool to connect to the Winbox port, and request the system user database file.
the file contains RouterOS system usernames and passwords.
No, do you? I f so let me know
well, if I had to do some thinking, the system user database file contains the database with users and their password......No, do you? I f so let me knowYou don't know what is stored in the system user database file ????They gain access on a file within the router, right? What kind of information is stored in there?How it works: The vulnerability allowed a special tool to connect to the Winbox port, and request the system user database file.
That is a completely different vulnerability that relates only to the SMB service, which by default is not even enabled (hence why you didn't hear much about this vulnerability).
It's possible the attack came from his LANOn Czech forum is user which have winbox in IP services allowed only for his private range and is hacked
https://ispforum.cz/viewtopic.php?p=228863#p228863
It is just that with Mikrotik's increasing popularity, hackers are now targeting RouterOS. Exploits exist on all equipment, just look at Cisco and Fortinet if you want an example...The security issues are happening too frequent on MikroTik recently...
I would also tend to agree. If you firewall all services on your WAN unless it comes from trusted IP's/ranges, then it would be very difficult to hack the tik from the WANIt's possible the attack came from his LANOn Czech forum is user which have winbox in IP services allowed only for his private range and is hacked
https://ispforum.cz/viewtopic.php?p=228863#p228863
It looks like the exploit is again of the "worm" type so if there is one leak into the LAN it can infect other MikroTik devices from the inside.It's possible the attack came from his LAN
It is possible, but unlikely. All attacks have IP 103.1.221.39.It's possible the attack came from his LANOn Czech forum is user which have winbox in IP services allowed only for his private range and is hacked
https://ispforum.cz/viewtopic.php?p=228863#p228863
In addition to what was written :What do do: 1) Firewall the Winbox port from the public interface, and from untrusted networks. It is best, if you only allow known IP addresses to connect to your router to any services, not just Winbox. We suggest this to become common practice. As an alternative, possibly easier, use the "IP -> Services" menu to specify "Allowed From" addresses. Include your LAN, and the public IP that you will be accessing the device from. 2) Change your passwords.
Supout.rif will be useful, thanks. The Screenshot doesn't show if the "allowed from" was correctly set.
it looks like a wan attack and IP services does not protect the login
Hi Normis,It's possible the attack came from his LANOn Czech forum is user which have winbox in IP services allowed only for his private range and is hacked
https://ispforum.cz/viewtopic.php?p=228863#p228863
Currently there is no sure way to see if you were affected. If your Winbox port is open to untrusted networks, assume that you are affected and upgrade + change password + add firewall. The log may show unsuccessful login attempt, followed by a succefful login attempt from unknown IP addresses.How do we know if our router is infected what are the symptoms for this vulnerability ???
This doesnt seam to work for me very good, i set the rules on top of my firewall list, also blocked via RAW but for example if i run port scanner from http://en.dnstools.ch/port-scan.html, it works and blocks access to it immediately as it runs.In addition to what was written :What do do: 1) Firewall the Winbox port from the public interface, and from untrusted networks. It is best, if you only allow known IP addresses to connect to your router to any services, not just Winbox. We suggest this to become common practice. As an alternative, possibly easier, use the "IP -> Services" menu to specify "Allowed From" addresses. Include your LAN, and the public IP that you will be accessing the device from. 2) Change your passwords.
set first in firewall filter "Drop port scanners rules" like this https://wiki.mikrotik.com/wiki/Drop_port_scanners but drop the scanners with RAW and finaly change the number of service port too !
We can only imagine what problems there will be when a vulnerability in the firewall is found...To be safe for now, only put IP restrictions on the IP Firewall itself.
Remember that normis has told us time after time that it is not possible to recover a password from a MikroTik device, you would have to reset and netinstall it.On the other hand, when you are the one that set the password and you can't log in to your own router, even though you could just reset to defaults or Netinstall to fix it, it's sometimes nice to be able to recover it so that the question of "what on EARTH could I have possibly set the password to?" doesn't constantly nag you.
I try and my router block scan instantly.This doesnt seam to work for me very good, i set the rules on top of my firewall list, also blocked via RAW but for example if i run port scanner from http://en.dnstools.ch/port-scan.html, it works and blocks access to it immediately as it runs.In addition to what was written :What do do: 1) Firewall the Winbox port from the public interface, and from untrusted networks. It is best, if you only allow known IP addresses to connect to your router to any services, not just Winbox. We suggest this to become common practice. As an alternative, possibly easier, use the "IP -> Services" menu to specify "Allowed From" addresses. Include your LAN, and the public IP that you will be accessing the device from. 2) Change your passwords.
set first in firewall filter "Drop port scanners rules" like this https://wiki.mikrotik.com/wiki/Drop_port_scanners but drop the scanners with RAW and finaly change the number of service port too !
But if i run it from https://mxtoolbox.com/SuperTool.aspx?action=scan, it finishes every time and shows my open ports on router without blocking it..
Try for your self.
/ip firewall address-list add address=123.123.123.123 list=Winbox_Admin comment="Custom";
:do {
:if ([:len [/ip firewall address-list find list=Winbox_Admin]] < 3 ) do={
/ip firewall address-list remove [find list=Winbox_Admin comment=Private_Default];
:put "Creating Winbox_Admin List";
:log warning "Creating Winbox_Admin List";
/ip firewall address-list add address=192.168.0.0/16 list=Winbox_Admin comment="Private_Default";
/ip firewall address-list add address=10.0.0.0/8 list=Winbox_Admin comment="Private_Default";
/ip firewall address-list add address=172.16.0.0/12 list=Winbox_Admin comment="Private_Default";
} else={:put "Winbox_Admin List Exists";};
:if ([:len [/ip firewall filter find comment~"CUSTOM: WINBOX"]] < 4) do={
/ip firewall filter remove [find comment~"CUSTOM: WINBOX"];
:put "Creating Winbox_Admin Filters";
:log warning "Creating Winbox_Admin Filters";
/ip firewall filter add action=add-src-to-address-list address-list=Winbox_Admin address-list-timeout=1w chain=input comment="CUSTOM: WINBOX PK Stage 3" dst-port=333 protocol=tcp src-address-list=portknock_2 place-before=1;
/ip firewall filter add action=add-src-to-address-list address-list=portknock_2 address-list-timeout=1m chain=input comment="CUSTOM: WINBOX PK Stage 2" dst-port=222 protocol=tcp src-address-list=portknock_1 place-before=1;
/ip firewall filter add action=add-src-to-address-list address-list=portknock_1 address-list-timeout=1m chain=input comment="CUSTOM: WINBOX PK Stage 1" dst-port=111 protocol=tcp place-before=1;
/ip firewall filter add action=drop chain=input comment="CUSTOM: WINBOX Drop Traffic to Winbox Port where src-address-list!=Winbox_Admin" dst-port=8291 protocol=tcp src-address-list=!Winbox_Admin place-before=1;
} else={:put "Winbox_Admin Filter Exists";};
:put "Done";
:log warning "Added Winbox Port Security";
};
OK, try this :But if i run it from https://mxtoolbox.com/SuperTool.aspx?action=scan, it finishes every time and shows my open ports on router without blocking it..
Try for your self.
Change:We have discovered a new RouterOS vulnerability affecting all RouterOS versions since v6.29.
How it works: The vulnerability allowed a special tool to connect to the Winbox port, and request the system user database file.
Versions affected: 6.29 to 6.43rc3 (included). Updated versions in all release chains coming ASAP.
Am I affected? Currently there is no sure way to see if you were affected. If your Winbox port is open to untrusted networks, assume that you are affected and upgrade + change password + add firewall. The log may show unsuccessful login attempt, followed by a succefful login attempt from unknown IP addresses.
What do do: 1) Firewall the Winbox port from the public interface, and from untrusted networks. It is best, if you only allow known IP addresses to connect to your router to any services, not just Winbox. We suggest this to become common practice. As an alternative, possibly easier, use the "IP -> Services" menu to specify "Allowed From" addresses. Include your LAN, and the public IP that you will be accessing the device from. 2) Change your passwords.
What to expect in the coming hours/days: Updated RouterOS versions coming ASAP. RouterOS user database security will be hardened, and deciphering will no longer be possible in the same manner.
EXAMPLE how to protect yourself:
Screen Shot 2018-04-23 at 13.01.48.png
Even with the later versions or ROS, you can download a backup, restore it on a virtual machine running same software version, downgrade to an earlier software version, take a new backup and feed that to the reverse engineer tool which will spew out the passwords for every user in the database.Remember that normis has told us time after time that it is not possible to recover a password from a MikroTik device, you would have to reset and netinstall it.On the other hand, when you are the one that set the password and you can't log in to your own router, even though you could just reset to defaults or Netinstall to fix it, it's sometimes nice to be able to recover it so that the question of "what on EARTH could I have possibly set the password to?" doesn't constantly nag you.
Was that really true? Or is what is now called a "vulnerability" in fact really a backdoor to retrieve the passwords from a seized device?
It is a bit too obvious that you can download the user database, something you normally cannot even do from winbox as an authenticated user, over the winbox port, without being authenticated.
Actualy i just realized i does work good in theory, but this site alternates ip address, so it took me 3-4 runs to block all 3 IPs and now it returns zero ports and blocks it properly.OK, try this :But if i run it from https://mxtoolbox.com/SuperTool.aspx?action=scan, it finishes every time and shows my open ports on router without blocking it..
Try for your self.
ip fi fi add action=add-src-to-address-list address-list=Port_Scanner address-list-timeout=1w chain=input comment="Port Scanner Detect" protocol=tcp psd=21,3s,3,1
Scan this 93.155.148.98 - my IP address and tell me the open ports please!But that whats the point of this, i ran it 3 times and got all my ports listed 3 times before mikrotik blocked it, "attacker" already have all it needs.
It shows none now, but is this site already on your block list?Try clearing the blocked ip list before running it.Also, try actually for test put some port open like 80, i have that one and it shows it as open when i run this scan for 3 times, and firewall rule catches 3 different ip addresses from this site scaner. After that it blocks scan and shows all ports CLOSED.Scan this 93.155.148.98 - my IP address and tell me the open ports please!But that whats the point of this, i ran it 3 times and got all my ports listed 3 times before mikrotik blocked it, "attacker" already have all it needs.
As a user without insight in the internals, you can download a backup only from a router when you know the password already, right?Even with the later versions or ROS, you can download a backup, restore it on a virtual machine running same software version
You are right. RouterBOARD devices come with default configuration that is immune to this kind of attack. The vulnerability can only be exploited, if you specifically opened Winbox to untrusted networks.Concur this is a serious issue and glad Mikrotik is addressing it promptly. However it appears, (not 100% sure) that the failure by an admin to ensure WINBOX is not accessible from the outside is what allows this exploit to be used. Most experienced admins would use vpn to access the router and then muck about. It would be folks like me, ordinary users, or perhaps lazy admins that would attempt to use Winbox to gain remote access. My own personal feelings on the matter is that we should be using rolling code devices with Winbox for external access (home owner) and you experienced chaps can use VPN. I only intend to use WINBOX internally in the current scheme.
As a user without insight in the internals, you can download a backup only from a router when you know the password already, right?Even with the later versions or ROS, you can download a backup, restore it on a virtual machine running same software version
What is happening here is downloading files from a router without the password. Over a port that normally doesn't even allow downloading those files.
I find it hard to believe that this is simply "a bug". There must be base functionality of downloading, and the bug is only that it can be done without authentication.
But the downloading functionality shouldn't even be there in the first place, in the model of "we keep all internals secret and the user can only use the config interfaces and API".
To me, it sounds more like a debugging feature accidentally left enabled, or a requirement from law enforcement they are not allowed to tell us about.
What is happening here is downloading files from a router without the password. Over a port that normally doesn't even allow downloading those files.
I find it hard to believe that this is simply "a bug". There must be base functionality of downloading, and the bug is only that it can be done without authentication.
But the downloading functionality shouldn't even be there in the first place, in the model of "we keep all internals secret and the user can only use the config interfaces and API".
To me, it sounds more like a debugging feature accidentally left enabled, or a requirement from law enforcement they are not allowed to tell us about.
or if you started your config from an old ROS version. Upgrades don't put new firewall rules in place, so if one had an old config that did not include these security measures and just upgraded, they would still be vulnerableYou are right. RouterBOARD devices come with default configuration that is immune to this kind of attack. The vulnerability can only be exploited, if you specifically opened Winbox to untrusted networks.Concur this is a serious issue and glad Mikrotik is addressing it promptly. However it appears, (not 100% sure) that the failure by an admin to ensure WINBOX is not accessible from the outside is what allows this exploit to be used. Most experienced admins would use vpn to access the router and then muck about. It would be folks like me, ordinary users, or perhaps lazy admins that would attempt to use Winbox to gain remote access. My own personal feelings on the matter is that we should be using rolling code devices with Winbox for external access (home owner) and you experienced chaps can use VPN. I only intend to use WINBOX internally in the current scheme.
this still is the device users/maintainers fault imo. THEY should implement basic security and best practices. Don't attribute to the vendor what the user should do.
What is happening here is downloading files from a router without the password. Over a port that normally doesn't even allow downloading those files.
I find it hard to believe that this is simply "a bug". There must be base functionality of downloading, and the bug is only that it can be done without authentication.
But the downloading functionality shouldn't even be there in the first place, in the model of "we keep all internals secret and the user can only use the config interfaces and API".
To me, it sounds more like a debugging feature accidentally left enabled, or a requirement from law enforcement they are not allowed to tell us about.
Don't attribute to malice what can be easily explained by incompetence. Even a basic buffer overflow or injection bug can allow full control of any networked device on the planet remotely. Security is hard.
Also, like normis said, it would be irresponsible for the manufacturer themselves to release further details of the exploit without a fix, especially when they themselves only discovered it from their customers (who btw, they have unusually not acknowledged) a few days ago.
The only problem here is a startling lack of defense in depth for security in the very core of RouterOS. The normal security assumption is that outer layers of security can always be penetrated, so further layers need to be present, and are normally even stronger. Instead of a good onion, Mikrotik have a coconut - great outer protection, but once you're in, you're IN.
Incompetence by MikroTik, yes. Recently it was already revealed that the webserver is running as root, now it looks like the same is true for the winbox service.Don't attribute to malice what can be easily explained by incompetence. Even a basic buffer overflow or injection bug can allow full control of any networked device on the planet remotely. Security is hard.
Right. Services running on external ports should not have access to data that is considered secret.The only problem here is a startling lack of defense in depth for security in the very core of RouterOS. The normal security assumption is that outer layers of security can always be penetrated, so further layers need to be present, and are normally even stronger. Instead of a good onion, Mikrotik have a coconut - great outer protection, but once you're in, you're IN.
If one does not have a specific FW rule ALLOWING EXTERNAL to INTERNAL access for the Winbox, then one should not be concerned as the default rules block WAN to LAN traffic, as they do for unsolicited traffic for every port. Nothing wrong for limiting access to WINBOX from the internal network as you have done and readily available in the settings.I just added to input specific src address who can access to winbox. I hope it's enough.
+ Rest input ports will be dropped
In my posting above. I suggested to Mikrotik to integrate port-knocking in Winbox, Android APP and the router self so that external access is not possible if you don't have the right knock sequence. The sequence can be managed in router and synced to the at that time connected Winbox and Android APP.Here's a simple port-knocking firewall + address list for anyone who wants to implement it in the interim for access to the default winbox port (8291)
First add any custom IP address ranges (known safe networks) you need like so:
/ip firewall address-list add address=123.123.123.123 list=Winbox_Admin comment="Custom";
SNIP
A set of private addresses are added by default so you don't get locked out of your router from internally.
This is from Web. Most likely unrelated.Just FYI,
in logs I saw login attemps, but they all seems to failed, not one of them is successfull.
but should still be firewalledThis is from Web. Most likely unrelated.Just FYI,
in logs I saw login attemps, but they all seems to failed, not one of them is successfull.
When the tool gets your password, it has full access and installs some kind of tools. This is secondary. Most importantly is to close access to your device so this is impossible.Correct me if I'm wrong, but isn't something missing here? Now we know how they got passwords to log in, but what about those files (script and binary) uploaded to router and (probably) executed by RouterOS? Is it some other hidden functionality of WinBox we know nothing about?
Maybe, but this is strange. Web interface indeed is available from Internet, but I changed default port from 80 to something else, and there was 5 attemps in 2 seconds, possible attack ?This is from Web. Most likely unrelated.Just FYI,
in logs I saw login attemps, but they all seems to failed, not one of them is successfull.
scanning for the new port isn't hard to do.Maybe, but this is strange. Web interface indeed is available from Internet, but I changed default port from 80 to something else, and there was 5 attemps in 2 seconds, possible attack ?This is from Web. Most likely unrelated.Just FYI,
in logs I saw login attemps, but they all seems to failed, not one of them is successfull.
That is kind of strange, because when I know the password of my router I still cannot install that kind of tools!When the tool gets your password, it has full access and installs some kind of tools.
I have the admin password of my own router, how can I upload shell scripts and ELF binaries to be executed?When the tool gets your password, it has full access and installs some kind of tools. This is secondary. Most importantly is to close access to your device so this is impossible.Correct me if I'm wrong, but isn't something missing here? Now we know how they got passwords to log in, but what about those files (script and binary) uploaded to router and (probably) executed by RouterOS? Is it some other hidden functionality of WinBox we know nothing about?
On MT specific hardware and using WINBOX -- winbox -- gains root access and if a vulnerability exists in Winbox code then root access can be had once that code is exploited but no one has yet proven that Winbox has that vulnerability .. so are there multiple faults here ---- like a special provision for Auctoritas?That is kind of strange, because when I know the password of my router I still cannot install that kind of tools!When the tool gets your password, it has full access and installs some kind of tools.
So there are multiple faults here.
I just installed it again with netinstall ... I do not want hidden visitors in my system....On MT specific hardware and using WINBOX -- winbox -- gains root access and if a vulnerability exists in Winbox code then root access can be had once that code is exploited but no one has yet proven that Winbox has that vulnerability ..That is kind of strange, because when I know the password of my router I still cannot install that kind of tools!When the tool gets your password, it has full access and installs some kind of tools.
So there are multiple faults here.
Is that now fixed in the latest release? Or are we waiting for an exploit for that one once a new way to enter access has been discovered?Like I said, this issue is secondary. It exists yes.
Like a special provision for Auctoritas?Is that now fixed in the latest release? Or are we waiting for an exploit for that one once a new way to enter access has been discovered?Like I said, this issue is secondary. It exists yes.
Shifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
Where do you see shifting blame on the users? It is information for users to know that routers are safe against this vulnerability if winbox port was protected.Shifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
I can't understand how you have come to such a poorly devised conclusion so I wrote you a haiku.Shifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
It started here: viewtopic.php?f=2&t=133438Normis (or other MikroTik people here) - can you, please, share the very important info: Is there a known attack / exploit you were informed about? Did you learn about this vulnerability from your own studies or from a "friendly" user? Or was someone already attacked, and it came during the analysis?
Or - simpler - is there a known exploit scanning the internet right now? Is there a group of people having detailed knowledge about this vulnerability? Or was it caught in advance, before anyone started exploiting it?
Calling it "unsecured" makes it sound like the router was exposed to internet with no firewall or passwords. My router was secured with firewall and strong passwords, and yes, it had the management port open to the WAN. Does opening up any port to the WAN make the router "unsecured"?Where do you see shifting blame on the users? It is information for users to know that routers are safe against this vulnerability if winbox port was protected.Shifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
!) winbox - fixed vulnerability that allowed to gain access to a router with an exposed winbox port
Disable any service you really really don't need. If you don't know what's it about, then you don't need it. Whatever remains (either winbox, https or ssh), protect with firewall as much as possible. Leave it open from only a few locations you can physically get to in due time, not to half of the country (just in case you're on the road). Getting hacked due to too wide open ports will give you more headache than occasional drive a few (hundred) kilometres (past experience will help you minimize number of rides after a while).Only closing winbox port is enough?
what about api and api-ssl ports?
The exploit may not appear in the logs. It can download system passwords without logging in, so even if there appears no successful or failed logins, you should consider your passwords compromised and change them. As it's apparently possible to run arbitrary code after compromise, system log files could be tampered to remove any traces of exploitation. If you are really paranoid the only safe way would be to netinstall.When is the first known exploit of this so we can browse the logs. And have exploit rewritten the log file ?
Auctoritas is a Latin word and is the origin of English "authority". While historically its use in English was restricted to discussions of the political history of Rome, the beginning of phenomenological philosophy in the 20th century expanded the use of the word.As for Auctoritas-what? Mozerd. Is this the title of the next book in the Dan Brown's Robert Langdon Series? ;-P
Now that the feature is officially confirmed (*), I think it won't take long to be documented by some good soul. The question is, how much MikroTik depends on having it in WinBox server, if they can easily block it or not.I have the admin password of my own router, how can I upload shell scripts and ELF binaries to be executed?
normis some of the commands in this article works only in old versions.That is true, yes.
We have a nice article on how to make your device secure, I suggest everyone read it, as it contains most of the basics:
https://wiki.mikrotik.com/wiki/Manual:S ... our_Router
Better would be "...gain acces to router accessible from the internet'Where do you see shifting blame on the users? It is information for users to know that routers are safe against this vulnerability if winbox port was protected.Shifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
If i don't use api's why i ask this???Disable any service you really really don't need. If you don't know what's it about, then you don't need it. Whatever remains (either winbox, https or ssh), protect with firewall as much as possible. Leave it open from only a few locations you can physically get to in due time, not to half of the country (just in case you're on the road). Getting hacked due to too wide open ports will give you more headache than occasional drive a few (hundred) kilometres (past experience will help you minimize number of rides after a while).Only closing winbox port is enough?
what about api and api-ssl ports?
hi Normis,v6.42.1 and v6.43rc4 have been released! They fix the vulnerability.
Bugfix coming soon as well.
Bugfix with fix for this issue has not been released just yet. Only Current and RC channels.hi Normis,v6.42.1 and v6.43rc4 have been released! They fix the vulnerability.
Bugfix coming soon as well.
is bugfix only 6.40.7 -- we need to use for breach fix?
No. Outgoing connection are not that much or even not limited by the default rules.sorry for my english. Let's say the files save.sh and dnstest hit the router. By changing the password and limiting access from outside through winbox, is there a guarantee that there will be no outgoing connection from my infected router and the new password will not be transferred to the attackers in this way?
Even with the fix in place you will still have to implement the limiting of access to the router. See first posting of this thread.hi Normis,v6.42.1 and v6.43rc4 have been released! They fix the vulnerability.
Bugfix coming soon as well.
is bugfix only 6.40.7 -- we need to use for breach fix?
Not if they can just request that new user and password because the vulnerability is still there. Also limit access as subscribed in the fist posting in this thread.Is it enough by changing the winbox port and password?
Not necessarily. If you had left your router open previously how do you know your device is not full of crapware. In other words, the correct thing to do is if the router was wide open previously to do some sort of reset to defaults PLUS PLUS. Mikrotik SHOULD PUBLISH a how to scrub the unit clean so it gets rid of whatever that virus planted or send you a new unit.ok, so it seems that the proper firewall rules, dropping winbox and ssh connections from outside my trusted network - saves me for now from big f*up?
netinstall without previous configuration ....Mikrotik SHOULD PUBLISH a how to scrub the unit clean so it gets rid of whatever that virus planted or send you a new unit.
The critical need is to update the ones that directly touch external gateways. Routers within your own network are much less at risk (assuming you don't serve an unusually vicious territory).Hello please tell me how I will update my 3000 mikrotiks again quickly and easily is already the second time that this happens ...
Same here.still waiting for the bugfix only update
This is not acceptable. Netinstall requires local travel to each individual router. Also, many routers are already installed in hard-to-access locations, such as towers and customer premises.netinstall without previous configuration ....Mikrotik SHOULD PUBLISH a how to scrub the unit clean so it gets rid of whatever that virus planted or send you a new unit.
Me tooSame here.still waiting for the bugfix only update
Then what do you consider acceptable? A way to wipe the entire router erasing all traces of previous actions, but keeping the current configuration? Weird...This is not acceptable. Netinstall requires local travel to each individual router. Also, many routers are already installed in hard-to-access locations, such as towers and customer premises.
use the dude to manage and monitor your mikrotik routersHello please tell me how I will update my 3000 mikrotiks again quickly and easily is already the second time that this happens ...
If you know how to manage 3000 devices you must have heard of The Dude or expect scripting.Hello please tell me how I will update my 3000 mikrotiks again quickly and easily is already the second time that this happens ...
Yes it is.If I understood correctly, Mikrotik keeps user passwords in a file in open form, not encrypted?!?!?!?!
A previous exploit was closed with a release that ran a tool that sought out and destroyed files that were not supposed to be in the ROS image. That's a fair solution.Then what do you consider acceptable? A way to wipe the entire router erasing all traces of previous actions, but keeping the current configuration? Weird...This is not acceptable. Netinstall requires local travel to each individual router. Also, many routers are already installed in hard-to-access locations, such as towers and customer premises.
still waiting ...Me tooSame here.still waiting for the bugfix only update
Nope. Passwords do are encrypted, but using symmetric (a.k.a. reversible) encryption. And there is a pretty big reason for that - Winbox "secure mode" uses CHAP for authentication. CHAP requires the server to know the correct user input in order to derive hashes for confirmation. (TMK MT doesn't use MSCHAPv2 for some patent reasons inside the USA and PAP authentication is not secure in transit. They also can't use a proprietary protocol because of SSO login / RADIUS integration.)Yes it is.If I understood correctly, Mikrotik keeps user passwords in a file in open form, not encrypted?!?!?!?!
(and this bugfix doesn't solve it)
Change the service port can resolve the problem?
The problem with allow from is that not always we have static ip address
Suggestions could be that field accept dns names, or allow to read from addressing list
Sent from my XT1580 using Tapatalk
No. These files were found in the RouterOS files directory. You can't run binaries or scripts from there. It seems the attacker though he will copy them inside RouterOS system to run them, but failed to do so. You can even see it inside the script, that there are actions that were supposed to be done, but obviously failed (like deleting of these files).No. Outgoing connection are not that much or even not limited by the default rules.sorry for my english. Let's say the files save.sh and dnstest hit the router. By changing the password and limiting access from outside through winbox, is there a guarantee that there will be no outgoing connection from my infected router and the new password will not be transferred to the attackers in this way?
You have to clean or restore before hooking the router to the wild wide west (internet) and don't forget to learn from and imlement the tios given in the first posting of this thread.
why would you let everyone have possible access to your router?Shifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
Use Ubiquiti instead Then you will have huge security problems and vulnerabilities. In last two years they had very serious problems with attacks (with one our network was seriously affected). If you properly configure firewall on Mikrotik it is very safe.Well, this is really embarrassing, my enthusiasm with MikroTik is fading due to this few recent vulnerabilities and attacks.
true indeed, but you shall not use winbox anyway. stuff that just downloads dlls from a remote devie (it used to for quite a long time) always scared the sht out of meShifting of the blame onto users... what else are we supposed to use for remote management?!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
Winbox should be merged with WebFig, everything in javascript and executed in a browser sandbox on the client.true indeed, but you shall not use winbox anyway. stuff that just downloads dlls from a remote devie (it used to for quite a long time) always scared the sht out of me
Yes, of course. We also have 6.43rc, don't mix those up.6.42.1 is "newer" than 6.42rcNN, right? It's an upgrade, not a downgrade?
Maybe someones will not agree with me, but I appreciate the speed of actions. The guide how to minimize the risks within 36 hours (over the weekend) after the first info popped up and the new release with the fix within one working day.Yes, of course. We also have 6.43rc, don't mix those up.6.42.1 is "newer" than 6.42rcNN, right? It's an upgrade, not a downgrade?
Versions with FIX are the following:
6.42.1 (released)
6.43rc4 (released)
6.40.8 bugfix (release coming today)
Firewall for Winbox port also protects your device, even with older versions.
Not likely to get added to Winbox, as it's already in Dude.@MT devs: I'd love to see new feature/button in Winbox (in wireless > registration table) which would mass upgrade all clients currently connected to AP to (let's say) latest version from current channel.
Hi,
should I also upgrade firmware or just RouterOS is enough?
As you have not done that for a long time, it is a good idea to upgrade it.Hi,
should I also upgrade firmware or just RouterOS is enough?
But You have to add all clients on the map as devices?Not likely to get added to Winbox, as it's already in Dude.@MT devs: I'd love to see new feature/button in Winbox (in wireless > registration table) which would mass upgrade all clients currently connected to AP to (let's say) latest version from current channel.
Disappointment, the only word i can think right now.Well, this is really embarrassing, my enthusiasm with MikroTik is fading due to this few recent vulnerabilities and attacks.
But the intruder can also sit inside your network. What if the intruder connects in with the MAC address/Neighbors service? There is no filtering possible on that.Just to bust some myths, i re-did the connection to a device that doesn't have no firewall input filter protection for the winbox port, but only the "allowed-address" type filterint in /ip service. some claim, that it is possible to extract information from the device this way. it seems, it isn't.
whenever a TCP SYN is sent to the device from a source address, that is not listed in the "allowed-address" field of ip service, the device responds with a TCP reset (RST, ACK). that is, no tcp connection is established. TCP RST messages do not have payload.
all in all, i suppose the address filtering is taking place "service independent" like a set of auto-generated invisible firewall rules with "reject" action or using TCP-wrappers.
capture screenshot attached.
long story short: ip services address restriction is OK.
additional message: nowadays no network segment can be treated as "secure"
It is a work in progress, it will take a while (weeks, possibly). Many programs need to be changed.Hi, just to clearly understand, and according to the OP that said 'RouterOS user database security will be hardened, and deciphering will no longer be possible in the same manner.', does the patched release already include that feature ?
TIA
Do not forget the users that brought this to the attention of Mikrotik. Those users certainty lost sleep and looks probally still a bit pale around the nose.I'm glad to see this got fixed so soon!
Many thanks to the team who works on this (and lost a lot of sleep probably)!
Attacks seem to be rather specific though, haven't seen the mentioned log entries on my dutch and czech routers.
yes. one can disable the mac-winbox functionality. but the attack surface is a lot broader on the internet. i just pointed out that remote exploits can be mitigated using ip service filtersBut the intruder can also sit inside your network. What if the intruder connects in with the MAC address/Neighbors service? There is no filtering possible on that.
Nope. If in-port is a part of a bridge - You can filter MAC-Winbox and MAC-Telnet pakets using bridge filter chain input.But the intruder can also sit inside your network. What if the intruder connects in with the MAC address/Neighbors service? There is no filtering possible on that.
You should be dropping such packets anyway. If you add them to a blacklist which blocks all communications from that IP, then you block legitimate services if someone spoofs them.Why blocking access to router is bad idea? Should "popular" addresses try to access our router?
/ip firewall filter
add action=drop chain=input comment=mac-winbox dst-port=20561 protocol=udp log=yes log-prefix=macwinbox
[me@hgw2] /ip service> /ip fire filter print stats interval=1 where chain=input and comment~"mac"
Flags: X - disabled, I - invalid, D - dynamic
# CHAIN ACTION BYTES PACKETS
0 ;;; mac-winbox
input drop 46 767 876
Dropping in input is fine, but I've seen several blacklists use raw table which would obviously affect forwarded traffic too.I know ... but it input chain is not the same as forward one. You can block access to router but not traffic forwarded to/from users.
This is an application that listens on a raw socket. It sees the traffic before the firewall. It does not matter what you do in the firewall (block or allow).so the IP firewall "sees" the traffic, the rule is actually evaluated _and_ it matches, but no action is taken.
You can access graphs within winbox - no need to use web access to them.This is the second advisory for this same port in as many weeks. Whilst we block it to the world we still feel compelled to update all our customers' routers. I hope this is not a sign of things to come.
While I'm on my soapbox I'd like to suggest that graphs are moved off the web management port. They are very different in the scope of their intended audiences, yet the functions are bound together.
/ip firewall address-list add address=something.allowed.com list=4TheWin
/ip firewall address-list add address=somethingelse.allowed.com list=4TheWin
/ip firewall filter set [find comment="Winbox"] src-address-list="4TheWin"
why? more simple and quick firewall solves this (see above examples).use layer7-protocol can solve this?
if can,how?
becouse i am Maintain 500+ mikrotik node,i have not static ip,i need to remote to connect.i can't reboot the mikrotik nodes,i need keep network normal first.and later to update.why? more simple and quick firewall solves this (see above examples).use layer7-protocol can solve this?
if can,how?
That is basically what you have when you set the "allowed from" in the service. At least when you can confine your internal networks using IP subnet declarations.Things would be mush simpler to set if we have option to bind services to specific interfaces. That would help to simply narrow access to services by network interfaces without messy IP filtering rules.
Either configure VPN on the routers so you can connect from anywhere and have more security, or get some VPS at a couple of $/month where you have a static IP, configure VPN to there, and set the fixed IP address of that VPS as your trusted external IP.becouse i am Maintain 500+ mikrotik node,i have not static ip,i need to remote to connect.i can't reboot the mikrotik nodes,i need keep network normal first.and later to update.
i will update all nodes,but need a few days.before update need a temp plan.i want to use layer7-protocol to control.Either configure VPN on the routers so you can connect from anywhere and have more security, or get some VPS at a couple of $/month where you have a static IP, configure VPN to there, and set the fixed IP address of that VPS as your trusted external IP.becouse i am Maintain 500+ mikrotik node,i have not static ip,i need to remote to connect.i can't reboot the mikrotik nodes,i need keep network normal first.and later to update.
To implement any change, you will have to go along all the nodes. So better use a permanent solution instead of wasting time now and having to re-do it later.i will update all nodes,but need a few days.before update need a temp plan.i want to use layer7-protocol to control.
Yes but the graphs in Winbox are rubbish compared to the web ones with their time and throughput scales.
You can access graphs within winbox - no need to use web access to them.
Hence why each router also has a unique admin password, so if the tunnel/radius had to break we can still get into the router/switch. All passwords are stored on a cloud service.There has to be a trade-off between a secure access and the risk of unreachable devices when something breaks.
With such config the device will be inaccessible when the connection to radius cannot be set up.
We use radius for customers, but to use it for management of the device would be too much of a risk for me.
Similar for using address lists. We have address lists with allowed management address (source) but they are static and a drag to maintain.
I would use DNS based address list, if they would not be flushed on reboot. Now, when a device is rebooted and is without DNS, it would be unable to load its address list from DNS and management would not be possible. A bit too risky.
indeed. I do the same with OpenVPN as most of my client routers are either behind NAT or have dynamic IP's.my take on remote accessible device management - and some may be behind a "one-way" access medium, like NAT or 3G/4G, where you can't just connect to the device from the outside - is to have a VPS running routeros. and there's no ports exposed there, but only IPSec.
so the managed devices shall connect to it via IPSec. no need for pushed down routes, what so ever.
then the manager user shall do the same.
and they can rendezvous in "cloud #9".
this way you don't have to expose no mgmt interfaces to anywhere.
you don't even need static IP for this, as tunnels can be initiated to FQDNs.
you can drop any management traffic on all routers on their exposed interfaces. yes, that would include also the subscriber/customer side as well.
whenever you access supports it, you can also use IPv6 as the transport of the tunnels to pull this off on some places.
... but that still leaves you vulnerable to the current problem. only your port filtering saved you, not your advanced password management!Hence why each router also has a unique admin password, so if the tunnel/radius had to break we can still get into the router/switch.
I reacted earlier to your post to include also the users of Mikrotik devices.I'm glad to see this got fixed so soon!
Many thanks to the team who works on this (and lost a lot of sleep probably)!
Yes and no, having a unique admin password at least lets you limit the risk. i.e not one standard password across all devices.... but that still leaves you vulnerable to the current problem. only your port filtering saved you, not your advanced password management!Hence why each router also has a unique admin password, so if the tunnel/radius had to break we can still get into the router/switch.
And what if you have disabled conntrack? In a powerful router, we need all power for routing purposes, and firewall is downstream it. Any linux service can be bound to a specific address / firewall...It can be done with one simple firewall rule.
Create interface list and add
/ip firewall filter add in-interface-list=xx ...
No, it isn't the same. "allowed from" allow you to open a socket to that service, and if it your src ip address isn't listed, it will close the connection. If service daemon is vulnerable...That is basically what you have when you set the "allowed from" in the service. At least when you can confine your internal networks using IP subnet declarations.Things would be mush simpler to set if we have option to bind services to specific interfaces. That would help to simply narrow access to services by network interfaces without messy IP filtering rules.
Also, you can match on in-interface in firewall filters. So you don't need to match on source IP when you don't like to.
Excuse me, but the whole point of releasing RouterOS in all channels yesterday was to completely close the vulnerability. It is right there in the changelog. Why are you even asking? Was this not made clear ?Can we get a straight answer for...
THIS ROUTER OS UPDATE PREVENTS THIS EXPLOIT.
AKA... one CAN NOT download the user file from router OS 6.42.1, using port 8291, without authenticating to the router first.
Can we get a straight answer for...
THIS ROUTER OS UPDATE PREVENTS THIS EXPLOIT.
AKA... one CAN NOT download the user file from router OS 6.42.1, using port 8291, without authenticating to the router first.
unless your question is a very bad attempt at asking for more details of the exploit, now that the fix is out, and how a customer can test that it has been actually fixed...!) winbox - fixed vulnerability that allowed to gain access to an unsecured router;
Vulnerable to what? This close of the connection occurs before any data exchange. It is not an RST reply to the SYN as was suggested by someone else, that would be even better, but it is SYN/SYN ACK/ACK/FIN ACK/FIN ACK/ACK, all without any data being exchanged. There does not appear to be much room for vulnerability exploits.No, it isn't the same. "allowed from" allow you to open a socket to that service, and if it your src ip address isn't listed, it will close the connection. If service daemon is vulnerable...That is basically what you have when you set the "allowed from" in the service. At least when you can confine your internal networks using IP subnet declarations.
Also, you can match on in-interface in firewall filters. So you don't need to match on source IP when you don't like to.
And what if you send a specially formed packet, and the router answers with the whole user database content? I prefer a brick wall instead of a door with 20 locksVulnerable to what? This close of the connection occurs before any data exchange. It is not an RST reply to the SYN as was suggested by someone else, that would be even better, but it is SYN/SYN ACK/ACK/FIN ACK/FIN ACK/ACK, all without any data being exchanged. There does not appear to be much room for vulnerability exploits.No, it isn't the same. "allowed from" allow you to open a socket to that service, and if it your src ip address isn't listed, it will close the connection. If service daemon is vulnerable...That is basically what you have when you set the "allowed from" in the service. At least when you can confine your internal networks using IP subnet declarations.
Also, you can match on in-interface in firewall filters. So you don't need to match on source IP when you don't like to.
I advise you to stop using software and go out of the IT business. Really.And what if you send a specially formed packet, and the router answers with the whole user database content? I prefer a brick wall instead of a door with 20 locks
You don't need connection tracking for this.And what if you have disabled conntrack? In a powerful router, we need all power for routing purposes, and firewall is downstream it. Any linux service can be bound to a specific address / firewall...It can be done with one simple firewall rule.
Create interface list and add
/ip firewall filter add in-interface-list=xx ...
Somethng about TCP connection usage in applications. There are basically these steps which occurs in TCP conenction life:And what if you send a specially formed packet, and the router answers with the whole user database content? I prefer a brick wall instead of a door with 20 locksVulnerable to what? This close of the connection occurs before any data exchange. It is not an RST reply to the SYN as was suggested by someone else, that would be even better, but it is SYN/SYN ACK/ACK/FIN ACK/FIN ACK/ACK, all without any data being exchanged. There does not appear to be much room for vulnerability exploits.No, it isn't the same. "allowed from" allow you to open a socket to that service, and if it your src ip address isn't listed, it will close the connection. If service daemon is vulnerable...That is basically what you have when you set the "allowed from" in the service. At least when you can confine your internal networks using IP subnet declarations.
Also, you can match on in-interface in firewall filters. So you don't need to match on source IP when you don't like to.