Poor SSL Implementations Leave Many Android Apps Vulnerable
Trailrunner7 writes "There are thousands of apps in the Google Play mobile market that contain serious mistakes in the way that SSL/TLS is implemented, leaving them vulnerable to man-in-the-middle attacks that could compromise sensitive user data such as banking credentials, credit card numbers and other information. Researchers from a pair of German universities conducted a detailed analysis of thousands of Android apps and found that better than 15 percent of those apps had weak or bad SSL implementations. The researchers conducted a detailed study of 13,500 of the more popular free apps on Google Play, the official Android app store, looking at the SSL/TLS implementations in them and trying to determine how complete and effective those implementations are. What they found is that more than 1,000 of the apps have serious problems with their SSL implementations that make them vulnerable to MITM attacks, a common technique used by attackers to intercept wireless data traffic. In its research, the team was able to intercept sensitive user data from these apps, including credit card numbers, bank account information, PayPal credentials and social network credentials."
Android is this century's most fatal security disaster. No other OS has had so many problems in the current years, and that includes the Windows OS's too. All on OS based on Linux.
Researchers from a pair of German universities conducted a detailed analysis of thousands of Android apps and found that better than 15 percent of those apps had weak or bad SSL implementations.
I would have thought that an SSL implementation, complete with certificate chain validation would be provided by the OS, and that apps would use that. Only apps that had special requirements should have to implement SSL. Does anyone know if android does provide a TLS interface, and if so are the apps ignoring the platform service?
I myself have implemented them for shopping apps (SSL for anything dealing with user details, payment, etc.). When you're communicating with an external service that requires (or where you want to use) encrypted connections and that service only offers SSL (this is probably 90% of the time) you need to use it. Now the catch here is that the standard SSL handlers available to you in Android provide an "ideal" setup, where servers and certs are exactly as they "should" be. The problem is unless you are paying rediculous ammounts for dedicated SSL services and high quality certs your setup will not be the "ideal", and you'll have to make exceptions by overriding code.
As an example, in the shopping system I set up there were two sets of certs, one set was signed [payment gateway] the other wasn't [user control pannel]. I had to jump through a few hoops, and the app would be open for man-in-the-middle if set up right - but luckilly all they'd get would be user login details, address and phone number - billing is all external and requires a separate authorization.
Do Android users have confidence in their security? Do they even think about it?
I have now read the article and it is apps misuse the APIS. They search for apps that either don't use the TLS APIs but have ssl addresses encoded, or which use a non-default trust manager. When you establish an SSL connection via the normal Java APIs the default trust manager does check the validity of the certificates (i.e. that tey are signed by a trusted CA) and that the URL requested matches the hostname in the certificate's subject DN. There can be valid reasons for overriding this, including using your own specific certificate rather than any signed by a CA, or for development to allow self-signed certificates - though this should be put in production.
They found that a lot of apps had overridden the rust manager in a dangerous way, allowing self-signed certificates in production or allowing any certificate even if id didn't match the host.
Though this is a problem it is not an "android issue". You can write apps that use self-signed certificates, bypass host checking etc. on Windows and any platform that allows you to customise certificate trust checking.
3
2
1
and....
go
If your feeding sensitive data to an android app, the ssl implementation is the least of your wories.
tell us something we don't already know
Huge difference there.
One is barking-at-the-moon batshit fucking crazy, the other is just run-of-the-mill poor implementation.
Yes - if you write your own SSL code and you don't do it for a full-time living YOU ARE BARKING-AT-THE-MOON BATSHIT FUCKING CRAZY. And if you're going to ARGUE that you're not, your also ignorant and STUPID.
The thing I love about this industry is that with every new platform, every generation of programmers manages to make errors that were made - and fixed - by a previous generation or on a previous platform. And it's an industry that aggressively weeds out experience - which is uniquely dysfunctional.
Credit card issuers and processors need to come down on this like a ton of bricks. Losing your access to a card network or losing your merchant agreement would probably be a powerful incentive.
Presumably you can write them for iOS, and I have no doubt that there are plenty of apps on the AppStore that are playing fast and loose with SSL trust managers.
True fact: I have written Java code to allow for self-signed or any old cert over SSL, or even none. It's not hard to find plenty of sample code. In the course of my employment the code was used for testing only and either not part of a production build or disabled by default in production, but I cannot say what other developers or teams may have done in with my code in their systems.
Why the authors focused on Android and why they felt the need to blame the OS rather than alerting people to cruddy apps, one can only speculate.
There is no reason a cert should expire. It should be revoked if compromised
As with most perceived fallacies, certificate expiry and password expiry arise from a heuristic. An older certificate or password is more likely to have been silently compromised than a newer certificate or password.
The problem does not always lie in the certificate. It also lies in the fact that the SSL clients built into Windows NT 5.1 (XP) Android 2.3 (Gingerbread) does not support Server Name Indication (SNI), which allows multiple certificates on one IP address. This lack of support for SNI was not corrected until Windows NT 6 (Vista) on PCs, Android 3.0 (Honeycomb) on tablets, or Android 4.0 (ICS) on phones and pocket tablets. Without SNI and without DNSSEC, each site using SSL needs its own IP address.
I'm not judging, mind you...matter of fact I think it's a nifty idea, I'm just not that nervous myself, BUT, if you're going to go through the trouble of having a dedicated device for security reasons, well, I have an AspireOne myself that's been relegated to toy status since traded in my elderly G4 desktop for a shiny new MBP and it runs OpenBSD well enough for your needs. WiFi isn't working but you probably wouldn't want to use that anyway.
And yes I realize there's virtually no difference in security between the two and you can't put STOP on a netbook but as I said, if you're going to have a dedicated device, only 2 security holes in the default install in a heck of a long time!
Facts do not cease to exist because they are ignored. - Aldous Huxley
I don't see how any of that is relevant for an app on Android, especially regarding why you would use a third party SSL implementation over platform native.
If multiple SSL sites are hosted on port 443 of a single IP address, Android 2's platform native SSL implementation can't see the certificate for any site other than the first. Firefox and Chrome for Windows use their own SSL implementation specifically to work around a similar missing feature in Windows XP's platform native SSL implementation.
What the fuck is it with companies not willing to spend a few thousand dollars on buying an industry-standard solution that works
Might some of these companies be micro-ISVs, built with sweat equity and run out of a residence until they grow large enough to become able to afford a dedicated office, employees, and all the other overheads of a "proper company"?
Just distribute (physically) a chunk of randomly-generated (with a hardware RNG of course) AES keys
Does hashing the output of an open microphone down to 1 bit per sample count as a hardware random number generator? If so, that might just work for long-term business relationships.
I pay 50 USD/year for a signed ssl certificate.
How much on top of this do you pay for the dedicated IPv4 address to host the site on which you use the certificate? Or is your Android application exclusive to Android 3 and 4, whose native SSL stack supports Server Name Indication, as opposed to Android 2.x, whose native SSL stack does not?
I do hope the example you mentioned occured somewhere in the nineties or so, when ssl certs were indeed still expensive.
In the 1990s, SSL certificates were expensive and IPv4 addresses cheap. In the 2010s, it's the other way around.
i think that some of the snarky applehead comments are being posted by linux users(or ms users) just so that they can start a new battle in the OS holywar---and vice-versa
kinda funny if i think about it that way but its better than if they were breaking into my car .
WHATEVER IT TAKES TO GET YOU THRU THE DAY!!!
The article says the latter: poor options provided to Android's native SSL library or to a third-party SSL library included in the application. Quoting Jon Oberheide of Duo Security: "For example, many developers will have an option to disable SSL cert validation when the app is in debug mode, but that code path won't be taken when the app is running for real."
One of the reasons this problem exists is there are no guidelines as to exactly how to present this problem to the user.
The user can't do anything about the problem - but they have to be told that their transaction (whatever it is) has failed or cannot be completed.
I suspect that on a PC, most people have no idea what that "certificate problem" dialog box means. As far as they're concerned, it's a useless error that happened on the way to their online banking session.
On mobile, it's even worse. You're using SSL behind the scenes, and what can you say?
"I'm sorry, I was trying to log in and the server credentials are different than what I expected. I can't log you in."
This will make even less sense to an end user, and won't fit on the screen.
"It appears that someone is trying to intercept the data we're sending to our servers. Do you want to continue and expose your private data to an unknown person?"
That's probably more accurate.
"For some reason, we couldn't verify the security of your connection. Do you want to continue and expose your data to an unknown person?"
That's probably a good error message, but I'm sure others can come up with better ones.
If you're using a self-signed cert, install your root into your app. Why not? It'll at least allow you to not turn off host checking.
This may be more of a problem overseas, but I've been in hotels in the US that I've been to that have tried to MTM on SSL (ie: the cert is from some network device in the hotel, not my bank). It was very strange.
I run it on my own VPS, which has a dedicated fixed IP address. I'm not saying my set-up is perfect. But a signed certificate + validation of the entire CA chain already solves a lot of issues.
And I don't SNI because I only have one hostname.
Look, we can discuss this as much as you want, but it doesn't change the fact that self-signed certs are simply "not-done" in a production-environment. As soon as I encounter an unsigned or expired certificate in a product, I just don't trust that product anymore. And I'm sure I'm not the only one...
...You are over-qualified and under-paid. If we give you a raise, we will break the cosmic balance of the universe.
Also, you can buy wildcard certificates for your domain if you use multiple subdomains. Still safer than self-signed certs
...You are over-qualified and under-paid. If we give you a raise, we will break the cosmic balance of the universe.
a good 'how to use ssl safely' tutorial? I guess that's the real question. It seems to me something as common as this should be well documented/implemented. I mean, google wrapped SQL for me. Heck, google's code let me get a rudimentary spend tracker written in under 6 hours and my silly little mirroring app in under 4. Their APIs are so simple and well organized that it brings computing back to the age when I write the apps I want, like coding Basic for my C64.
:(.
Probably the problem is google can't implement their own SSL w/o worrying about liability
Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
Simple: The Apple Store rejects applications that disable proper CA checking. It can only be disabled by private iOS API's if I'm not mistaken. Apps that use private API's are automatically rejected.
...You are over-qualified and under-paid. If we give you a raise, we will break the cosmic balance of the universe.
SSL is a lower level service that should be provided by the OS or Android development framework, or at least by a third-party library. App developers should only need to worry about the actual application logic and not things like SSL.
Do they actually check or are you saying they could or should?
Can you guys all get together on this and FIX IT??!!! WTF??! I thought you all were SUPPOSED TO KNOW how to make financial transactions secure! Sounds like everyone's passing the buck (no pun intended) here, blaming it all on somebody else's bad coding. That's not a reasonable excuse for a user's banking activity to be left so open. Either it's secure or it isn't, even 99.9% secure is not good enough. I mean, thanks for reminding me again why I don't entrust my finances to personal tech, I stay old school offline, and deal directly at a bank office, but c'mon! Come up with a solid secure system that works!!! The people of the world would be reallyreally grateful to you then, right now it's like playing russian roulette when you use any online form of banking, odds are that the hammer will fall on an empty chamber, but sooner or later...
Allowing just about anybody to create an app has a lot of upsides.
Allowing just about anybody to create an app has a lot of downsides. Too.
Life is great! (as told by Lady Susan)
So what free music and free movies do you recommend as substitutes for those from Google? Or do you happen to live in a country where record labels and movie studios have chosen not to license their works to Google, and your version of the store has only apps or only apps and books?