Live data from Hacker News

Any Android app can read your WhatsApp database

bas.bosschert.nl

41–50 of 140 posts

Re: Any Android app can read your WhatsApp database

#41
post #5

Storing critical data to external storage (which is clearly explained as unsecure in http://developer.android.com/guide/topics/data/data-storage.... ) is a huge security hole. This kind of basic oversight makes me wonder about base competence of WhatsApp developers - anyone with basic understanding of the OS would get that anyone can read external storage.

One important point here: In the article the author says that the location of the database is /sdcard/WhatsApp/Databases. That's not entirely correct. It only gets copied there when you use the build in backup feature (Settings -> Chat Settings). Else, it sits "safely" under /data/data/com.whatsapp/databases like every other Android sqlite database. But nonetheless, WhatsApp was and is not really known for its safety…

This needs to be at the top. The fix here is very simple then - prompt the user for a passphrase when doing a backup, allow no passphrase for a "friction free" if you really want to, but give the user the option.

Re: Any Android app can read your WhatsApp database

#43
post #37

Earlier quoted context omitted.

I don't think you are evaluating the tradeoff at all here. WhatsApp won by making a friction free experience. You are adding email and pass phrases, or any one of the dozen things that make it harder to use. I accept there is a good solution, but I don't think you are thinking about the problem broadly.

There is no "tradeoff" here for a reasonably vertebrate hominid. When you demand user trust, security is core. If it's not core, go home because you cannot be trusted to make adult decisions. The people using your software are more important than your fucking term sheets, man.

You do realize all desktop software has this same vulnerability. I think you are being a tad hyperbolic.

WhatsApp has some blame, but Google should have figured out how to let applications sandbox data on the SD card without having to do roll your own AES key management system. It could have been as simple as put the data in a folder named "private/appname/".

Re: Any Android app can read your WhatsApp database

#44

Earlier quoted context omitted.

Just out of curiosity, where would you store the unique AES key, that wouldn't break the UX in many ways? For instance, not losing messages when you upgrade your phone.

Storing the key is easy, you put it in your app's private data folder. Which is where the database should have just been stored in the first place, and not on the public SD card. You could also have a user-supplied passphrase with email recovery. Or any of a dozen other best practices that exist. This isn't exactly a new problem, there are plenty of solutions that are far superior to rot13 (which is basically all thi…

Even better than the app's private data folder, use Android's KeyChain API to store the key in hardware-backed credential storage:

http://developer.android.com/reference/android/security/KeyC...

Re: Any Android app can read your WhatsApp database

#45
post #29
post #7

Earlier quoted context omitted.

Em, no - that can only be done in internal store "data" directories which are usually formatted with UNIX filesystems and are by default secure (and cannot be accessed by other apps at all). WhatsApp is storing to external (on most devices FAT) storage (which was SD card on older devices, it's usually a separate directory/partition on newer ones) which does not have any ACL-like system due to FAT backwards compatibil…

Honestly, the more I tinker with Android, the more I'm terribly disappointed in Google. I mean, around Android 2 we were all excited by the potential of a first-class big-money supported open-source OS to really shake up the industry. It had so much potential. Now? Well, it still has a lot of potential. Even Google seems kind of embarrassed by it, compared to the Chrome brand.

I've never seen Google put out that vibe. If anything they're proud of it. I'm not sure what you mean. Can you elaborate?

Re: Any Android app can read your WhatsApp database

#46

Earlier quoted context omitted.

As long as Facebook gets to read all those billions of "personal" communications - messages, videos, audio, images - they are fine with anything.

Are you... are you saying they are trying to copy... Google ?!? I am speechless by such a statement.

> speechless

Wrong. You spake.

Re: Any Android app can read your WhatsApp database

#47
post #37

Earlier quoted context omitted.

There is no "tradeoff" here for a reasonably vertebrate hominid. When you demand user trust, security is core. If it's not core, go home because you cannot be trusted to make adult decisions. The people using your software are more important than your fucking term sheets, man.

You do realize all desktop software has this same vulnerability. I think you are being a tad hyperbolic. WhatsApp has some blame, but Google should have figured out how to let applications sandbox data on the SD card without having to do roll your own AES key management system. It could have been as simple as put the data in a folder named "private/appname/".

OS X doesn't have that problem when using sandboxed applications. I choose to opt out by installing non-sandboxed applications, but I know that I'm doing so and I don't install non-sandboxed stuff from people I don't trust. I also have much more accessible tools for inspecting the behaviors of applications, should I want to do so, on OS X than Android - I can do my own homework if I have a notion. (I don't expect end users to do so, but the option is there.)

And Android external storage is explicitly not for sensitive, in-the-clear data. Ever. It doesn't matter what Google "should have" done. They documented What Not To Do, and then WhatsApp went ahead and Did.

Re: Any Android app can read your WhatsApp database

#48

Earlier quoted context omitted.

Just out of curiosity, where would you store the unique AES key, that wouldn't break the UX in many ways? For instance, not losing messages when you upgrade your phone.

Storing the key is easy, you put it in your app's private data folder. Which is where the database should have just been stored in the first place, and not on the public SD card. You could also have a user-supplied passphrase with email recovery. Or any of a dozen other best practices that exist. This isn't exactly a new problem, there are plenty of solutions that are far superior to rot13 (which is basically all thi…

The key should be in the private data folder, the database belongs on the public sd card since it gets very large.

Re: Any Android app can read your WhatsApp database

#49

Earlier quoted context omitted.

Just out of curiosity, where would you store the unique AES key, that wouldn't break the UX in many ways? For instance, not losing messages when you upgrade your phone.

Storing the key is easy, you put it in your app's private data folder. Which is where the database should have just been stored in the first place, and not on the public SD card. You could also have a user-supplied passphrase with email recovery. Or any of a dozen other best practices that exist. This isn't exactly a new problem, there are plenty of solutions that are far superior to rot13 (which is basically all thi…

>app's private data folder

That may be the problem. WhatsApp has focused since the beginning on making their app available on as many devices as possible (They even have symbian compatibiity).

My WhatsApp database is almost 500MB, this is more than many low end Android phone's internal memory. Therefore, they decided to store the database on the SD card.

I don't think that this should be a problem had they decided to implement proper encryption on the database.

I'm not an expert and this is just pure speculation, so please, take as it is.

Re: Any Android app can read your WhatsApp database

#50
As an Android developer, the real hole here is being able to read the encryption key. Jelly Bean 4.3 adds the potential for "secure key storage" which only works if the user is not smart or persistent enough to break the obfuscation through using the application itself with a debugger and a rooted phone. There is no fully safe method to store keys on a device if the attacker can gain access to the same device.
Post reply on HN