First you find Atrient's client list (tip: it's on their website at http://www.atrient.com/about/client-list/ …) and look up Android apps released in their name. Download them using the tool `gplaycli', or pull the APKs off some sketchy-looking site online. (3/?)
-
Show this thread
-
Once you've downloaded the APK (`gplaycli -d name-of-app'), you do two things: First run `d2j-dex2jar com.vendor.package.apk' to convert Android .dex to Java .class. Then you extract the app using `apktool d com.vendor.package.apk'. (4/?)
2 replies 1 retweet 22 likesShow this thread -
`apktool' will create the `com.vendor.package' directory in your current directory. When you've done this, open the `com.vendor.package-dex2jar.jar' file d2j generated in the `jd-gui' program - it's a Java decompiler. (5/?)
2 replies 0 retweets 20 likesShow this thread -
With `jd-gui' purring nicely, hit Ctrl+Shift+S, check all the "Search For" boxes, and search for "PKCS12". It *should* come up with `NetworkManager.class', double click it and it'll take you to the matching code. (6/?)
2 replies 0 retweets 19 likesShow this thread -
You should either find the password in cleartext in a string nearby, or something like `paramContext.getString(2131492865);`. If you come across the number, open `R.class', Ctrl+F for it, and copy the variable identifier. (7/?)
1 reply 0 retweets 21 likesShow this thread -
Then look for it in the apktool directory, in `com.vendor.package/res/values/strings.xml' - the password should be there, in plaintext. (8/?)
1 reply 0 retweets 18 likesShow this thread -
Anyway, once you have the password, move to `com.vendor.package/assets', find the `.p12' files, and run `keytool -list -v -keystore <KEYSTORE_FILE> -storetype PKCS12 -storepass "<PASSWORD_HERE>"'. It'll spit out a bunch of data, including an encrypted RSA key at the top. (9/?)
2 replies 0 retweets 21 likesShow this thread -
Copy that key (with the header and footer) to a separate file, name it something like "thedomain.tld.key.enc", and run `openssl rsa -in domain.tld.key.enc -out domain.tld.key'. The password should be the same, and you'll have the decrypted key. (10/11)
1 reply 1 retweet 21 likesShow this thread -
Once you have the RSA private key, you could do something funky, like MitM-attacks or impersonating the server. Or whatever your heart desires! I suspect these keys are used for backend communications, as the crypto. fingerprints differ from the ones on the websites. (11/11)
1 reply 0 retweets 30 likesShow this thread -
POST SCRIPTUM: These apps were publicly released by Atrient, and with them, the casinos' private RSA keys. The decryption passwords were also shockingly easy to find, and to make matters worse, it turns out most of the certificates are wildcard DV certs.pic.twitter.com/xkEHPDUwYd
5 replies 30 retweets 141 likesShow this thread
Hm, I only have two of their apps in my pile of Android apps that distribute private keys. I wonder if it's only some of the apps that make this mistake? Or if my methodology is flawed in some way? But yeah. Private key for a wildcard domain. I notified these authors a year ago.pic.twitter.com/EbpWmjTB93
-
-
Replying to @wdormann
Yeah, I've come across a surprising amount of Android app with secrets inside them. Here are four of the Atrient app identifiers, I was unable to find all of them on Google Play: com.atrient.aviresort com.atrient.treasurebaycasino http://com.gr .casinos com.myddwv
2 replies 5 retweets 8 likes -
Replying to @duniel_pls @wdormann
For what it's worth, I often take the route of responsible disclosure and giving them some time, but everything considered[1], I don't feel like I owe them that. [1]: https://secjuice.com/security-researcher-assaulted-ice-atrient/ …
3 replies 0 retweets 7 likes - 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.