Live data from Hacker News

Decrypting Android Snapchat images

github.com

41–50 of 65 posts

Re: Decrypting Android Snapchat images

#41
post #39
post #31

Earlier quoted context omitted.

> Nothing instills confidence in cryptographic code like the constants "bananas" and "seems legit...". 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.

[deleted]

Well, prior - there were apps you could download that would save Snapchat images that would work on non-root devices. At least by enabling this encryption that's now only available to the relatively small amount of root users out there.

Re: Decrypting Android Snapchat images

#42

The end of Snapchat? 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.

Not really. Most people couldn't care less about the 10 second thing. They use Snapchat just as a means of sending a quick photo. It's just more fun than texting. I know very few people who actually care about the privacy aspect of it.

Re: Decrypting Android Snapchat images

#43
post #38

The fundamental problem here is application security in situations of rooted devices is non-existent. Android lacks mechanisms for apps to tell they're running as root too (as the root user could disable this) so you can't disable functioning on rooted devices. (Chrome OS does not have this problem, as the official builds are signed by a single authority). Newer Android versions have support for hardware DRM modules…

[deleted]

You are not providing for the security of those that own the content, either in the case of a movie studio or in this case the taker of the photograph.

If you choose to have root, fair enough, but that decision does mean certain applications should cease to work. Simply banning all those applications from being allowed isn't really a solution at all.

Personally, I prefer to carry separate devices which are rooted and not, and this strikes me as the only viable way forward.

Some of your tech details are wrong btw. It is quite possible to get images on the screen which can't be accessed by the CPU, for example. Phones are not architecturally anything like as simple as desktop PCs.

Re: Decrypting Android Snapchat images

#44
post #7

Earlier quoted context omitted.

They shouldn't store the images on the phone. You should be only able to view the image immediately after downloading it. After 10 seconds of viewing the image, everything gets deleted from ram.

I wonder why they didn't choose this path. A trade off for better usability ? Why would an app break it's core promise to offer better usability ?

Because it's still totally flawed? Nothing stops anyone from writing a program that pretends to be Snapchat and downloads the keys and images as it pleases.

Re: Decrypting Android Snapchat images

#45
post #38

Earlier quoted context omitted.

[deleted]

You are not providing for the security of those that own the content, either in the case of a movie studio or in this case the taker of the photograph. If you choose to have root, fair enough, but that decision does mean certain applications should cease to work. Simply banning all those applications from being allowed isn't really a solution at all. Personally, I prefer to carry separate devices which are rooted and…

[deleted]

Re: Decrypting Android Snapchat images

#46
post #28

I don't understand why it says the IVs are unnecessarily stored as without them you could not decrypt the first block for each image properly.

Maybe the unnecessary part refers to keeping the IVs in the "secure" bananas file, instead of as unencrypted metadata in the DB? IVs aren't a secret.

Re: Decrypting Android Snapchat images

#47
Snapchat does not take security seriously. I used the Gibsonsec description of the SnapChat API to make a Java Snapchat client called JavaSnap (github.com/hatboysam/JavaSnap). It has been used in many Android apps with close to 2M combined downloads (from what contribs have told me).

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).

Re: Decrypting Android Snapchat images

#48

Earlier quoted context omitted.

In the end the application needs a key to decrypt the storage. That key has to be stored somewhere on the device. On a rooted phone there is no place out of reach, so all they can do is make the storage obscure. Unless the hardware provides some inaccessible secure thingy there's not much they can do... I guess even if it did a script like that could access the secure thingy via USB debug as well. I don't think the d…

No matter how secure they store the photo, at the end the day a simple screenshot makes it all for nothing. It would be cool if Android had some API to disable screenshots.

It actually has — Apps can prevent the system from taking screenshots by telling the DRM hardware chip that they are showing important data. Actually you can even prevent users from obtaining the data if you encrypt it with a secure key and store this key in the DRM hardware chip.

Only problem: Someone could still decompile your app, use your API and request the decryption keys.

Re: Decrypting Android Snapchat images

#49

Earlier quoted context omitted.

In the end the application needs a key to decrypt the storage. That key has to be stored somewhere on the device. On a rooted phone there is no place out of reach, so all they can do is make the storage obscure. Unless the hardware provides some inaccessible secure thingy there's not much they can do... I guess even if it did a script like that could access the secure thingy via USB debug as well. I don't think the d…

No matter how secure they store the photo, at the end the day a simple screenshot makes it all for nothing. It would be cool if Android had some API to disable screenshots.

Uhm, Android had an API to disable screenshots since forever - see http://developer.android.com/reference/android/view/WindowMa... . As soon as you add this flag to the Window, the contents will disappear from screenshots or device will refuse to make them (depending on Android) version.

The reason why Snapchat has screenshot notification is actually due to that API being absent from iOS for a long time.

Re: Decrypting Android Snapchat images

#50
post #7

Earlier quoted context omitted.

I wonder why they didn't choose this path. A trade off for better usability ? Why would an app break it's core promise to offer better usability ?

Because it's still totally flawed? Nothing stops anyone from writing a program that pretends to be Snapchat and downloads the keys and images as it pleases.

If you hide a per-device API key inside the real Snapchat app, you might at least require that the user root the device before being able to grant an Evil App access to their photos.
Post reply on HN