Community discussions

MikroTik App
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Heartbleed

Mon Apr 14, 2014 4:55 pm

All RouterOS versions are secure against the Heartbleed issue.

All versions prior to v6.13 used an unaffected, older version of OpenSSL, and since v6.13 the latest OpenSSL version will be used, where the heartbleed issue is fixed.

We didn't use any of the affected OpenSSL versions in any of our products, so no specific action is required on your side.

v2 until v6.12 (included) = secure because use an older OpenSSL version
v6.13 (and above) = secure because use a newer OpenSSL version
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Heartbleed

Mon Apr 14, 2014 5:44 pm

MikroTik vs. Cisco
MikroTik Wins 8-2
Last edited by rextended on Tue Apr 15, 2014 1:04 am, edited 1 time in total.
 
n21roadie
Forum Guru
Forum Guru
Posts: 1949
Joined: Fri Aug 07, 2009 10:36 pm
Location: Limerick,Ireland

Re: Heartbleed

Tue Apr 15, 2014 12:05 am

MikroTik - Cisco
MikroTik Wins 8-2
As mentioned Mikrotik is not effected by Heartbleed, so I don't understand comment Mikrotik - Cisco or Mikrotik Win8-2?????????
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Heartbleed

Tue Apr 15, 2014 1:00 am

MikroTik vs. Cisco
MikroTik Wins 8-2
As mentioned Mikrotik is not effected by Heartbleed, so I don't understand comment Mikrotik - Cisco or Mikrotik Win8-2?????????
Cisco is affected to Heartbleed.
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1345
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: Heartbleed

Tue Apr 15, 2014 4:06 pm

Excellent ...
 
User avatar
honzam
Forum Guru
Forum Guru
Posts: 2395
Joined: Wed Feb 27, 2008 10:27 pm
Location: Czech Republic

Re: Heartbleed

Wed Apr 16, 2014 10:44 am

v2 until v6.12 (included) = secure because use an older OpenSSL version
Can you write which version use? Number of OpenSSL version?
 
Cougar281
newbie
Posts: 29
Joined: Mon Sep 23, 2013 3:52 am

Re: Heartbleed

Wed Apr 23, 2014 9:30 pm

Not sure how you are claiming that Mikrotik wins over Cisco with regards to heartbleed - yes, Cisco has affected products - just about everyone does, but if you want to compare apples to apples (or firewall or firewall to firewall), then it's a tie - the Cisco ASAs are unaffected. Switches are unaffected. Routers are unaffected. IPS is unaffected. The only thing listed as confirmed affected related to the ASAs is the AnyConnect Secure Mobility Client for iOS - yay apple. The list of unaffected products is longer than the list of affected products. Source
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Heartbleed

Wed Apr 23, 2014 10:05 pm

But have SOME affected products, MikroTik NONE.

And MikroTik not win 1-0 for that, but 8-2.

I do not want reveal why 8-2.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Heartbleed

Thu Apr 24, 2014 1:10 pm

I do not want reveal why 8-2.
I'm guessing you're counting the total security issues, and whether the vendor was affected by them at all.

In the case of MikroTik's 2 points, I'm sure one of them is the SSH DoS bug. I'm not entirely sure about the other one.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Heartbleed

Thu Apr 24, 2014 6:17 pm

I do not want reveal why 8-2.
I'm guessing you're counting the total security issues, and whether the vendor was affected by them at all.

In the case of MikroTik's 2 points, I'm sure one of them is the SSH DoS bug. I'm not entirely sure about the other one.
You have revealed one, the other are rights excalation by API (obvious if are enabled).
But I not want write only single detail, for not make public this discovery.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Heartbleed

Thu Apr 24, 2014 6:38 pm

I do not want reveal why 8-2.
I'm guessing you're counting the total security issues, and whether the vendor was affected by them at all.

In the case of MikroTik's 2 points, I'm sure one of them is the SSH DoS bug. I'm not entirely sure about the other one.
You have revealed one, the other are rights excalation by API (obvious if are enabled).
But I not want write only single detail, for not make public this discovery.
I think I know what you're talking about... I'll verify my suspicions, and if true, I shall report it to support.

(I won't say more before that... no need for a false flag panic.)
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Heartbleed

Thu Apr 24, 2014 7:51 pm

OK, I did found just one thing... but since it requires a lot of situational variables to line up (and is therefore unlikely to happen in practice), I think I can share it publically.

If you run a script with a user that has high permissions (e.g. "admin"), and within that script you write a file that you then import from that same script (e.g. a file that you've fetched via "/tool fetch")... Even in normal circumstances, you need to do a ":delay" of at least two seconds for the file to be written on disk before importing it.

Within that delay, an API user that only has "write,api,ftp" policy can modify the file to anything it wants, including, for example "/export file=FileWithPasswordsAndAll.txt" or "/user set limitedApiUser group=full", and the script would execute just that, allowing the user to access previously restricted data and functionality.

This does not work if the user does not have "ftp" permissions, since even the API needs these to read/write files from the "/file" menu. Also, the writing needs to happen EXACTLY during the delay. If it's too early, the script will override the malicious content with its own, and if it's too late, the script would already be executing the actual script, rather than the malicious one.

Also, who gives anyone write access to their router via the API protocol without trusting them? Therefore, even if there's a breach via this method, it will need to happen by an insider - someone with a RouterOS user account with sufficient permissions.

The above is in v6.12. I tried a lot of other things, but failed to escalate my permissions. I don't know if earlier versions are vulnerable to the other things I've tried, including:
- Having an "admin" script execute another "admin" script, except that the second "admin" script has been altered by the limited user during the execution of the first admin script, before it got around to running the second one.
- Having a limited user "add" a script with "policy" that exceeds its granted ones.
- Simply running an "admin" owned script with full permissions from a user with limited permissions... The fact that this one fails is kind of a bummer though... I would've thought that if the script is owned by "admin" AND has lots of permissions granted on it, those would be temporarily granted when the script is run by anyone. Instead, these reflect minimum permissions a calling user needs, PLUS the script restricting itself to the specified permissions if additional ones are granted.

@rextended I'm guessing that's not the one you have in mind... Have you tried duplicating your issue with 6.12 yet?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Heartbleed

Fri Apr 25, 2014 2:24 am

I not want to start a quiz, mystery, flame, post chain, etc. (and I hope I have written this well on English)

But for each hint about the problem I have found subsequently come out more post, question, etc.

I only "say" well done, you center the problem!
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Heartbleed

Fri Apr 25, 2014 10:31 am

OK, I did found just one thing... but since it requires a lot of situational variables to line up (and is therefore unlikely to happen in practice), I think I can share it publically.

If you run a script with a user that has high permissions (e.g. "admin"), and within that script you write a file that you then import from that same script (e.g. a file that you've fetched via "/tool fetch")... Even in normal circumstances, you need to do a ":delay" of at least two seconds for the file to be written on disk before importing it.

Within that delay, an API user that only has "write,api,ftp" policy can modify the file to anything it wants, including, for example "/export file=FileWithPasswordsAndAll.txt" or "/user set limitedApiUser group=full", and the script would execute just that, allowing the user to access previously restricted data and functionality.

This does not work if the user does not have "ftp" permissions, since even the API needs these to read/write files from the "/file" menu. Also, the writing needs to happen EXACTLY during the delay. If it's too early, the script will override the malicious content with its own, and if it's too late, the script would already be executing the actual script, rather than the malicious one.

Also, who gives anyone write access to their router via the API protocol without trusting them? Therefore, even if there's a breach via this method, it will need to happen by an insider - someone with a RouterOS user account with sufficient permissions.

The above is in v6.12. I tried a lot of other things, but failed to escalate my permissions. I don't know if earlier versions are vulnerable to the other things I've tried, including:
- Having an "admin" script execute another "admin" script, except that the second "admin" script has been altered by the limited user during the execution of the first admin script, before it got around to running the second one.
- Having a limited user "add" a script with "policy" that exceeds its granted ones.
- Simply running an "admin" owned script with full permissions from a user with limited permissions... The fact that this one fails is kind of a bummer though... I would've thought that if the script is owned by "admin" AND has lots of permissions granted on it, those would be temporarily granted when the script is run by anyone. Instead, these reflect minimum permissions a calling user needs, PLUS the script restricting itself to the specified permissions if additional ones are granted.

@rextended I'm guessing that's not the one you have in mind... Have you tried duplicating your issue with 6.12 yet?

I am sorry, but here are some points:
1) you allow user to edit files
2) you are executing files that can be edited by other users that have permissions to edit files.

you knowingly allow this to happen, where it the problem?

if you are not fetching through secured channel, you are vulnerable to the man-in-the-middle attack, that will just inject required code to create new user/remove configuration whatever.

If you want security you should move from "pull-updates" to "push-updates" scenario that you can do over API-SSL.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: Heartbleed

Fri Apr 25, 2014 1:04 pm

I am sorry, but here are some points:
1) you allow user to edit files
2) you are executing files that can be edited by other users that have permissions to edit files.

you knowingly allow this to happen, where it the problem?
With "write,api,ftp", you're not allowing the API user to read files, reboot the system, change passwords, read other sensitive information, do pings, etc. and you may not want that to happen... and yet it does, even though you never intended for it to happen.

However, you have a point. As I said both at the start, and towards the end, few admins would give even just write access to an untrusted party, which combined with the limited window, makes this an unlikely attack to happen in practice.

I guess the only remotely realistic scenario where this MAY cause a problem IF you ALSO somehow manage to intervene in the middle of the delay, would be an API application that for whatever reason (say, convenience) is used for both management by end users and by admins for FTP purposes (say, to allow quick hotspot page updates). As an attacker, you'd need to rely on the management (API) part to do the work of writing a file, escalate the API user's permissions that way, and then read sensitive information or do similarly dangerous things.

But even that scenario requires an API application that has been compromised enough to, at the very least, allow arbitrary file writes by end users. In practice, an API application that writes files should check the name of the file to make sure it's not the name of a known to-be-executed script OR forbid the overwriting of files AND allow only the removal of files that it itself knows are owned by that user by other means (e.g. a database or an artificial prefix to the file name to "namespace" the uploaded files from fetched scripts and the like). So the onus is more on the API application, rather than RouterOS.


The only thing RouterOS could possibly do to prevent this (again, extremely unlikely) attack would be to not release any file write locks obtained during the script, until that script is over, and thus block other scripts and protocols (including the API) if they try to write to the same file before the script is over. This approach however risks a badly written script hanging, and thus making touched files be completely unavailable until a system reboot.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Heartbleed

Fri Apr 25, 2014 3:08 pm

then again, user with ill intent that has write access can change your configuration enough to get ALL your traffic and simply filter through unencrypted data to get information.

I do not see a point to call this a flaw in RouterOS. It is a flaw in user configuration.
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12008
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Heartbleed

Fri Apr 25, 2014 3:17 pm

then again, user with ill intent that has write access can change your configuration enough to get ALL your traffic and simply filter through unencrypted data to get information.

I do not see a point to call this a flaw in RouterOS. It is a flaw in user configuration.

Yes exactly, but is still better MikroTik, versus Cisco...
 
basisbit
just joined
Posts: 4
Joined: Wed Feb 08, 2012 9:22 pm

Re: Heartbleed

Tue Jun 17, 2014 3:45 pm

How about http://web.nvd.nist.gov/view/vuln/detai ... -2014-0224 ? As far as I can see, this allows man in the middle attacks and allows to steal the session, when you use the RouterOS WebConfig, maybe also a SSH connection, but not sure about that.
 
User avatar
normis
MikroTik Support
MikroTik Support
Topic Author
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Heartbleed

Tue Jun 17, 2014 3:46 pm

How about http://web.nvd.nist.gov/view/vuln/detai ... -2014-0224 ? As far as I can see, this allows man in the middle attacks and allows to steal the session, when you use the RouterOS WebConfig, maybe also a SSH connection, but not sure about that.
no

http://forum.mikrotik.com/viewtopic.php ... 29#p430829

Who is online

Users browsing this forum: Bing [Bot], CGGXANNX, sotahe9145, tdw and 222 guests