Or change winbox port and waiting for security update.Just implement good firewall rules and all will work well.
I think not the product must be fixed, but those people must be fixed.Maybe, but in the end it's good, because once a problem is found and fixed, whole product gets better.
ip firewall filter add chain=input action=accept protocol=tcp src-address=[allowed IP] dst-port=8291 comment=Winbox
This wouldn't help. Such attack on my ROS sill consume all available CPU. Checked on RB951, 2011, hAp Lite and CCR1036.Any device should have a firewall from the ports where unauthenticated users have access.
Even with syn cookies, the attack is still successfull: we have not yet connection with attacker and suddenly receive RST package from him.Have you enabled "SYN COOKIE" option in the RouterOS settings? You should. This will help.
Just try to test this exploit on some devices.Have you enabled "SYN COOKIE" option in the RouterOS settings? You should. This will help.
Services like winbox, www, telnet and ssh typical use less than 1 Mbit per second. What, if create limit for traffic and packets per second? Like 5 Mbits and 1000 p/s.If there is an open service, the router will take requests and send answers. There is no way around that. If you have ideas how to "eat the cake and have it" at the same time, let us know
I think you forgot: for management from internet, use a VPN.Basically you have these choices:
that still is one open service. unless you make a VPN to some other machine, then console into the CCR ... or something like that, when I mentioned OOBMI think you forgot: for management from internet, use a VPN.Basically you have these choices:
Of course, but in this case you can avoid this particular vulnerability because you can use a VPN that does not use TCP and thus you do not need an accessible TCP service.that still is one open service. unless you make a VPN to some other machine, then console into the CCR ... or something like that, when I mentioned OOBMI think you forgot: for management from internet, use a VPN.Basically you have these choices:
Please post details. We cannot repeat this. Also post your config.No need for open ports. Exploit works even in case of transit (forwarding) packets. Just tested it on my RB751G-2HnD.
UPD. The problem exists on many soho routers, tested on Dlink+Openwrt and Huawei with same result as Mikrotik.
So far there is nothing that is affected. There is no exploit. The people are complaining that router CPU gets busy when working. This is normal. Either stop bad traffic with firewall, or disable services from public access.@normis: Could you post more information about affected versions? Is the problem specific to 6.38.5 or whole branch of 6.38 or is the situation even worse and affects more versions?
RB2011UAS-IN. Config reset to default, see attachment. Software: 6.37.5 (bugfix). Firmware: 3.33 (latest).Please post details. We cannot repeat this. Also post your config.
sudo perl exploit.pl 192.168.88.247 11111 1.1.1.1 11111
[admin@MikroTik] > system resource monitor
cpu-used: 100%
cpu-used-per-cpu: 100%
free-memory: 107064KiB
[admin@MikroTik] > tool profile
NAME CPU USAGE
ethernet all 15.5%
console all 0.5%
dns all 0%
firewall all 58%
networking all 13.5%
management all 0.5%
routing all 0%
profiling all 1%
bridging all 17.5%
unclassified all 2%
Firewall raw don't help in this case, I tried it. No matter what you do with configuration.In latest RouterOS versions there was added special feature - /ip firewall raw. special filter that can specify what traffic get to connection tracking, what traffic bypass it, what traffic are dropped before getting to connection tracking. Together with suggesting that was already mentioned, you can minimize this load.
No. Not any traffic. Any traffic don't produce this effect. Only traffic, generated by the exploit. And not ony from LAN, but from WAN also, no matter the firewall. Anyone in the Internet can generate DoS from one PC - I think it's a problem.avn. Any traffic in such amounts will load the router, even if it is going to the internet.
This is your LAN. Go and unplug this user. If you are an ISP, call the police. There are other methods to solve sabotage in your LAN.
Still. It is not an exploit. Such things affect any internet router or internet connected device.
There is nothing special in this traffic, look at the code. It just makes new TCP RES connections. If you download 100 torrents with 100 peer each, you will get same effect. The trick is to make NEW connections, so that the fasttrack doesn't come into play.No. Not any traffic. Any traffic don't produce this effect.
Agree. Although it will be nice to have capability to block unusual amount of tcp rst. Like unicast storm control or something. At the moment I don't know what to do if some guy in my network decided to test this exploit on my VPN server, for example.There is nothing special in this traffic, look at the code. It just makes new TCP RES connections. If you download 100 torrents with 100 peer each, you will get same effect. The trick is to make NEW connections, so that the fasttrack doesn't come into play.
there is no connection-state=untracked, so accept it in the very beginning of firewall;, together with established and related.I think it's important to remember that a substantial amount of traffic is needed to have any sort of effect on your devices. You won't be able to bring down a CCR using a residential xDSL line that only has a couple Mbit/s upload speed, or have one of your WiFi customers kill your network because they won't be able to get the appropriate amount of packets going. Also, i think using raw firewall tables to "notrack" connections to tcp/8291 is maybe a sound idea (be careful - using notrack will make "related" firewall filter matching impossible for those connections).
Is this 6.38.5 and above only? Or does this also work on 6.37.5?
6.38.5 and 6.37.5 both are affected. Tested it myself.I'd also like to know this as well.....Is this 6.38.5 and above only? Or does this also work on 6.37.5?
Does this explicitly effect devices running 6.38.5 and above. Or would it apply to all devices running 6.38.5 and below?
Actually not. If Stuxnet was not detected on time, would you be happy with XX dead people in Iranian nuclear facility? There are bad guys, but there are also good guys who published this info ( and many more). Second part of this story is network security. Its different then network implementation and administration. It is science for itself. You may like it or not, but there are alot of people ( including myself) who are enjoying playing with firewalls and overall IT security. More than anything else.Sigh... some people seem to be only on the planet to destroy other people's work and fun.
How pathetic.
There is no solution. But normally, there is no problem either.What is soloution ?
Unplugging your internet works best!Works
/ip firewall raw
add action=drop chain=prerouting in-interface=ether1 ttl=equal:106
LolUnplugging your internet works best!Works
/ip firewall raw
add action=drop chain=prerouting in-interface=ether1 ttl=equal:106
Please understand that anyone with enough resources can block any network with or without MikroTik.P.S. Anybody with this exploit can block any network with mikrotik - this is not good
If my resource home internet connection/linux PC with exploit and i can block large corporate network builded on mikrotik devices - this is vulnerability, not normaly situation.Please understand that anyone with enough resources can block any network with or without MikroTik.
1. Your PC will not have enough resourcesIf my resource home internet connection/linux PC with exploit and i can block large corporate network builded on mikrotik devices - this is vulnerability, not normaly situation.Please understand that anyone with enough resources can block any network with or without MikroTik.
Harrdware router (without linux inside) not vulnerable my this exploit?
P.S. Sorry for my bad English - this is not my native language.
1. Resources enough to stop the work of the router. We tested it experimentally.1. Your PC will not have enough resources
2. Large corportate network has firewall and other protection
3. Any other network is just as vulnerable if you send lots of traffic to an open port
@svserg1. Resources enough to stop the work of the router. We tested it experimentally.1. Your PC will not have enough resources
2. Large corportate network has firewall and other protection
3. Any other network is just as vulnerable if you send lots of traffic to an open port
2. Mikrotik are not a firewall?!
3. We need a solution to the problem, not an excuse, Normis
Are you trying to convince me of what I saw with my own eyes?@svserg
Your PC has a lot more CPU power than most of today's routers and if you test this on LAN (over 100 or 1000mbps connection) it is true that you can overload almost any router's CPU.
But in real-life scenarios the attacker is usually on a separate remote network with much less available throughput between his PC and the target router. So, it is much more likely he will first congest that connection between the two than overload target's router CPU.
Regards,
M.
/ip firewall filter add action=add-src-to-address-list address-list=port_DDoS address-list-timeout=1d \Please post your rules. We can't load RouterOS to 100% with a regular PC if proper protection is configured.
Can you please provide an example of "proper protection"? As a Mikrotik best practice?Please post your rules. We can't load RouterOS to 100% with a regular PC if proper protection is configured.
I'm not an expert but I believe these rules contribute to the problem you're seeing./ip firewall filter add action=add-src-to-address-list address-list=port_DDoS address-list-timeout=1d \
chain=input connection-state=invalid limit=50k,5:packet log=yes protocol=tcp src-address-list=!port_DDoS tcp-flags=rst
/ip firewall raw add action=drop log=yes chain=prerouting comment=DDoS log-prefix=BANN: protocol=tcp src-address-list=port_DDoS tcp-flags=rst
I notice that too, and it is actually a bug because those are "related" to the closed session. The connection tracking entry is deletedSide note: I don't drop connection-state=invalid on chain=forward as it blocks RST/ACKs generated by modern versions of Windows.
Yes. You are right, there is such error of the session closing, according to the protocol standard, at the end of the session there are flags <ACK> <FIN> and <RST>, but Mikrotik does not remember these connections. As a result, huge traffic is generated in a large network. If the IP with invalid the packages added to the list, which then drop - all the services will stop working, because MikroTik forgets about these sessionsI notice that too, and it is actually a bug because those are "related" to the closed session. The connection tracking entry is deleted
too soon: after the FIN/FIN ACK it is immediately deleted but it should be kept for a couple of seconds to make sure that such RST ACK
or another FIN ACK is allowed.
It also affects NAT: when the connection is NATted, the RST ACK is not translated as the active connection has already been deleted, and
it goes out with the local (RFC1918) source address when it is not otherwise filtered. Not good.
However, this is not a MicroTik-specific bug, it is a Linux kernel bug. So it is not likely it is going to be solved, it probably requires major kernel work.
a) If the IP with invalid the packages added to the list, which then drop - all the services will stop workingI'm not an expert but I believe these rules contribute to the problem you're seeing.
(a) Why not action=drop all connection-state=invalid traffic? If it's a concern then there's no reason to burden the RouterBOARD with it. Even Mikrotik suggests that you drop all invalid packets. Side note: I don't drop connection-state=invalid on chain=forward as it blocks RST/ACKs generated by modern versions of Windows.
(b) It will require more memory and more CPU power to maintain the address-list for 1d. I'd be concerned about it causing resource exhaustion with a DDoS of hundreds or even thousands of IPs. My suggestion would be to maintain the list for a shorter amount of time, perhaps 30s, as frequently attacking IPs will still be flagged for the action=drop rule, but IPs that stop attacking will be removed from the list sooner and free up resources.
(c) A limit of 50,000 packets is probably much higher than the RouterBOARD will ever see during normal operation. I'd suggest experimenting with a lower limit of perhaps 250 packets, 500 packets, or whatever is an appropriate baseline for your environment.
(d) log=yes is resource intensive and I don't suggest enabling it for large volumes of traffic. In addition, the factory default logging configuration will only retain 100 lines in the local memory buffer. If you want to log I'd highly suggest sending everything to a syslog server.
(e) tcp-flags=rst is unnecessary considering connection-state=invalid. Removing it will lower CPU consumption on the RouterBOARD.
No, it should not have that effect., but Mikrotik does not remember these connections. As a result, huge traffic is generated in a large network. If you just drop it, then some services stop working.
RFC 793No. RST is not part of the standard session closedown, it is a "rude close". Microsoft does this,