Forum Discussion
Andy_Herrman_22
Nimbostratus
Aug 15, 2007XTrustProvider security hole
This is specific to the XTrustProvider class used in Java, though it could apply to other languages as well (I just don't know how trust is implemented in those languages).
Up till this point I've just been using the XTrustProvider class provided in the SDK as it was the only way I knew of to get the connections to work. I never really figured out what it was doing, so I started poking around at it. I think I have an OK understanding of what it's doing now, and I'm a bit worried that it's a security hole.
From what I can tell the XTrustProvider class simply bypasses all the certificate checks, essentially giving trust to everything. This seems pretty dangerous, as it's basically nullifying one of the purposes of the certificates. Man-in-the-middle attacks would be fairly easy to do in this case, as there is no actual validation of the certificate. Such an attack could use a self-signed certificate of its own and proxy the iControl requests, which would both give it the ability to monitor whatever's being done through iControl, and, more worryingly, could get the username and password used to authenticate. After that they would have full access to iControl and could wreak havoc.
The chances of such an attack are probably minimal as long as the management interface isn't publicly accessible. However, even when contained within a private network the idea of giving global trust is worrisome. Unrelated breaches in the network could potentially be used to compromise the BIG-IP system simply because those systems utilizing iControl are too trusting.
There are a couple options which I think would be significantly better security-wise than using the simple XTrustProvider class from the SDK.
The first, and probably best solution, would be to install the server's certificate in the local keystore. When installing the certificate you have full control over the cert, so you can verify that it's correct before installing it. Any time a different certificate is seen the connection would fail. The only real problem with this solution is that you have to manually install the certificate everywhere iControl will be running. If you're creating some kind of user application for server management this could be annoying for the users, (and also annoying when the cert expires and you have to create a new one and push it out) but it would be much safer.
The other option would be to have a much more sophisticated implementation of the trust provider. The first time you connect it would add the certificate it gets into the keystore (probably using logic similar to that found in the installCert application found in the SDK). If a certificate already exists in the keystore then that one is used. At a later time if a different certificate is seen it is rejected. As long as you know everything is correct the first time you run the application then this will work simply as an automated version of the first option. If you're writing a user application you could even show a prompt when the certificate has changed instead of just rejecting it, and allow the user to pick whether or not they want to allow it (with the option to save the new cert to the keystore for future use).
I believe either of these options would be significantly more secure than using the provided XTrustProvider class. Can anyone think of other solutions that would be more secure (and possibly easier for administrators or users to deal with)? Anyone see any problems with the solutions I provided? Am I completely misunderstanding XTrustProvider?
- Andy_Herrman_22
Nimbostratus
You're right that even when using the XTrustProvider class the likelihood of a breach is pretty slim. Someone would have to have a pretty specific idea of what they're attacking and would need to compromise the network before being able to attack, which would hopefully be difficult itself (again, assuming the management interface isn't made public, though generally that's a safe assumption).
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects