Decrypting Android Snapchat images
github.com
github.com
It's not exactly good marketing, though.
Not to mention, even if the hardcoded password was somehow stored securely, using AES in ECB mode is insecure. ECB mode leaks information, particularly when applied to images: http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#...
And a class called "SlightySecurePreferences". One gets the feeling that the programmer responsible knew exactly what he was doing, but had been told to do it anyways.
https://whispersystems.org/blog/advanced-ratcheting/
Pro tip for future chat app start-ups promising "security" or "privacy" or as the latest trend goes, "anonymity" for their users. If you can't really hold your end of the bargain, don't do it! Promise cute emoticons or whatever, instead. Hopefully there will be some class action lawsuits against companies like Snapchat, soon. They need to learn their lesson.
That is a stellar decision. I wonder if there were application-specific constraints that prevented a more secure option.
I don't think the developers are to blame. They did what they could.
The real problem is that snapchat promises something it can not technically deliver. Once a photo leaves your phone and is delivered to somebody else, you lost control over that photo.
This is an okay compromise tbh.
(They could offer a super secure option or whatever, I guess)
(I like security.)
But it doesn't work, since you need some way to generate new API keys for your second device... which could be a Bad App.
If you 1) enforce one key at at time (so one "device" at a time), 2) rate-limit key changes (if you switch to a new device, or Bad App, you can't switch back within a day or two) and 3) eliminate Bad Apps in the app stores- you effectively limit Bad Apps to being entirely web-based, and hopefully the restrictions on webapps will make the Bad App sufficiently a pain in the ass to use that people won't want to switch to it, even though it lets them save photos, since it locks them out of the real app.
Snapchat was designed for ephemeral communication, not secure "send-and-destroy" messages. It would be very foolish of them to market it as something it cannot possibly be.
Only problem: Someone could still decompile your app, use your API and request the decryption keys.
The reason why Snapchat has screenshot notification is actually due to that API being absent from iOS for a long time.
It's precisely the same problem with DRM. You either lock down everyone's devices against their owners (a massive "do not want" situation) - and then you could still copy the data via the old-fashioned analogue hole (I'm not including the truly disturbing idea of adding implants to people's brains that force them to "delete" something they've seen) - or accept the inevitable fact that data that can be accessed is data that can be copied.
Quite frankly, Snapchat is a form of DRM, except it's marketed toward users in a way that makes it appear desirable.
I think this is something that is orders of magnitude easier for technophiles to accept than the average person.
Because to the average person it so so easy to delete data - they press the delete key and its gone! So they look at the problem and think the computer programmers just need to do a better job.
Whereas you or I realize that it virtually is impossible to prevent access of data - at least on a systemic level, and the problem (though in some cases it is the programmer's fault) isn't something that better programmers could fix.
Yes, this is all exactly as bad as you think it is. Yes, you did just read ECB. Snapchat clearly isn't even trying to be secure.
Newer Android versions have support for hardware DRM modules which would allow potential for some sort of nasty workaround (which may involve transcoding any images into movies), but in the general case for the wider market it's not going to work yet.
Finally, this is also why the NFC stuff is generally accompanied by another isolated system, though I seem to recall early versions of that (like in the Nexus S) proved to be sidesteppable.
As the owner of the device (ie the one who should have ultimate control over it), this is precisely what I want. It would be horribly broken for an operating system to do anything else!
That we're not only still fighting the battle for personal computing but additionally having to defend against misguided ideas from people in supposedly technical communities is ridiculous.
It was too easy. This is why things like 'The Snappening' happen (note: I never did anything evil like that, but it would not have been hard).
2. Most apps have documented or undocumented APIs. Writing a client to consume them does not indicate insecurity. It's only a security issue if the undocumented API exposes something that the company did not actually intend to expose (which, to be fair, is fairly common).
I have serious doubts about Snapchat's security due to the username <-> phone number leak discovered by GibsonSec, but the other things you listed say nothing of their security posture.
https://developer.android.com/reference/android/security/Key...
He sets his computer as a proxy between snapchat-app and snappchat-server. When I did this, Snapchat was certificate pinned to their server (it's been over a year though..so correct me if Im wrong).
This isn't an attack other people on the network can perform on you.
We implemented a standard Blowfish encryption in university at a small project on the side and it was better than that.
I'm by no means a cryptography expert, but you don't store keys on the device, they are generated dynamically. Storing them in a directory that seems like an unimportant directory is the most amateur mistake of trying to increase security, as it adds zero security.
What would you encrypt the data with that the user himself cannot also access? Without a secure encryption hardware module, there's little you can do except add additional layers of obscurity.
You could encrypt all the data with a key derived off the user's password, and require the user to re-enter the key if the app stops. That too could be broken.
You could store the images in some odd obfuscated format that only the app can understand. That too could be broken after some time.
You could never store any images on disk at all and fetch them only when requested. Then you have the third-party services imitating the app.
The fact that their current encryption procedure is half-assed is because they know it'll be security by obscurity no matter what they do, so why even waste time?. It doesn't make a real difference either way. They just want to prevent the absolute simplest attacks. They could have XOR'd all images with a 1-byte key and it would be equivalent, and still would suffice the business need.
What would have been some better alternatives to keep the encrypted files safe on the phone? Couldn't they have it call the server for a dynamic (safe) key?
I cannot understand people who confide their privacy to companies like Apple and Snapchat. Of course their photos will be 'leaked'. It's just a matter of time.
Really? That's Snapchat's unique selling proposition!
Their proposition is not that this is impossible, but rather that it is not easy for a typical end user to see past images. This enables a form of ephemeral communication; it was never intended as a security feature, simply a communication feature.