Re:Ripping OAuth tokens out of Twitter apps
by armooo on Monday August 20, 2012 @09:31PM
(#4410712)
I pulled the keys out of the android client this weekend. Not as good of a write up, but I used apktool to convert the APK back to xml resource files and smali dalvik assembler. Greped for Hmac and added some logging. Did the same thing for oauth_consumer_key. Rebuilt it as an APK with apktool. Signed it with jarsigner. Watched the logs and logged in. I think the best part is this key can use xauth so other clients can have the nicer UX of the official client.
[ Parent
| on HN ]
are you intentionally neglecting the additional steps to make this work, or did you not test your assumptions against the requests that the app actually sends? ;)
I tested this on the with the twitter api. This key was already leaked in 2010 at https://github.com/mitsuhiko/logbook/blob/master/twitter-sec.... So I will just post it here. https://twitter.com/armooo/status/237729837157060609 take a look at the name of the client.
>>> key = 'Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys'
>>> oauth_consumer_key = '3nVuSoBZnx6U4vzUxf5w'
>>> import tweepy
>>> auth = tweepy.OAuthHandler(oauth_consumer_key, key)
>>> auth.get_xauth_access_token('armooo', <password>)
<tweepy.oauth.OAuthToken object at 0x110985810>
>>> api = tweepy.API(auth)
>>> api.update_status('This is an update %s:%s' % (oauth_consumer_key, key))
<tweepy.models.Status object at 0x110985c90>ah, yes, you're right, was thinking of another api endpoint.
Re:Ripping OAuth tokens out of Twitter apps
by necenzurat on Monday August 20, 2012 @11:26PM
(#4411009)
well, jellybean has app encryption http://developer.android.com/about/versions/jelly-bean.html#...
Re:Ripping OAuth tokens out of Twitter apps
by armooo on Tuesday August 21, 2012 @12:14AM
(#4411148)
Reading this http://nelenkov.blogspot.com/2012/07/using-app-encryption-in... it looks like if you have root on your phone you can still access the APKs. Sounds like it is using the same encryption system as the apps on SD. But have have not had a chance to look at it.