Hey everyone. I’ve recently added “cloud save” support to my game using Parse.com and the nifty mod_parse Corona module. This requires that I embed my Parse REST API key within my game’s source code.
This feels insecure to me. If someone were able to reverse engineer the API key from the .apk or .app, they’d be able to impersonate the app and CRUD data from my account. Granted, I’m not storing any sensitive data like credit cards, but I obviously don’t want anyone wiping out all my saved games for kicks.
I was able to find my key pretty easily by following these steps:
-
Rename the .apk to .zip and expand the archive
-
Run “grep -lr <mykey> *” on the newly expanded directory
-
Voila, the key was found in assets/resource.car
Any advice on how to mitigate this risk? I can’t imagine this problem is exclusive to Corona users of the Parse REST API. Any app that needs to authenticate against a remote service theoretically needs to embed some credentials within the client.