`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/?)
-
Show 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 -
Replying to @duniel_pls
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
1 reply 2 retweets 10 likes -
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
Got it. Sounds like you may have been doing some work similar to what I did! My framework found the three of those that are in the Google Play store. If you're at all interested in my summary presentation, check out: https://resources.sei.cmu.edu/library/asset-view.cfm?assetID=517768 …
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.