Live data from Hacker News

Amazon Is Downloading Apps From Google Play and Inspecting Them

blog.rajbala.com

41–50 of 113 posts

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#41

MixRank analyzes mobiles apps (android and ios) and we often see apps with embedded api secrets, private keys, and passwords. It's really surprising. If you'd like to send an email like this to your users, send me an email (in profile) and I can query our database and check to see if any of them are including their api keys.

[deleted]

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#42
post #38

Earlier quoted context omitted.

I think this is a more plausible approach (and likely cheaper resource-wise to implement). Though, if the authentication requests somehow identify the Android app in question, it might be easy for Amazon to then perform a follow-up and download the app to verify their suspicions and avoid false-positives.

I dont think it would be that hard to automate decompilation and fire off an email after looking for secret keys. Either way it's good to see.

This exists as a service - http://apkscan.nviso.be/ does a scan of your APK and registers requests to servers, lists hardcoded strings and other possible issues.

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#44
I'm curious why some apps need API to access to AWS. What's the use case? Surely not to spin up an EC2 instance when the user clicks a button? Save files to S3? I'm not being sarcastic, genuinely curious. And what's the proposed solution suggested by AWS?

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#45

I'm curious why some apps need API to access to AWS. What's the use case? Surely not to spin up an EC2 instance when the user clicks a button? Save files to S3? I'm not being sarcastic, genuinely curious. And what's the proposed solution suggested by AWS?

It's hard to say without knowing the app, but my first guess would be for storing files in S3 or pushing a message into a SQS queue.

AWS supports temporary access keys, and one of the recommended solutions is to have an API which generates temporary credentials for a specific task that will expire shortly after.

Edit:

Heres a link http://docs.aws.amazon.com/STS/latest/UsingSTS/CreatingSessi...

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#46
post #30
post #11

I don't think they are inspecting the app ; they don't need to. They can see that there are a higher-than-average number of API accesses from a given platform, using the AWS Secret Key as the login credential.

But then how would you automatically identify the app name as shown in his email? I think it's easier to download the app. Only ~1m android applications out there. You can probably crawl the android store with just 1 or 2 servers using the algorithm I described below with a trie. Identifying patterns from random data seems way harder to get right, but maybe that's because I have a CS background rather than a statisti…

Most Android http clients put the package name in the user agent header. It's trivial for Amazon to find the app as a result.

Also, Amazon would use Aho-Corasick if they were really in the mood for violating the Google Play TOS.

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#48
post #10

I wonder how they would identify a string that appears to be an API secret, and queries their database for it. For every plausible string in every app? I guess they decompile it and find string literals of the correct length?

Probably just looked in strings.xml and perhaps for some obvious variable names / validation against string values. There might be some hashing check they can do that means they don't query every valid string in their database.

Or the strings command. http://unixhelp.ed.ac.uk/CGI/man-cgi?strings

Re: Amazon Is Downloading Apps From Google Play and Inspecting Them

#49

Earlier quoted context omitted.

Does it matter? A constant string is a constant string.

Well, if you want to obfuscate a constant string in your code, you can, e.g. by generating it dynamically from summing two hardcoded integer arrays. Not to say you should, but you can.

That sounds an awful lot like DRM with all its failed approaches…
Post reply on HN