Live data from Hacker News

Consumer key/secret for official Twitter clients

gist.github.com

71–80 of 104 posts

Re: Consumer key/secret for official Twitter clients

#71
post #67

Does twitter honor the the oauth_callback parameter? Otherwise, how can those keys be used by an attacker?

oauth_callback is only interesting for web app authorization. For out-of-band authorization flows, you can't protect it with a callback filter. Since these keys were lifted from an application that does out-of-band auth flows, any other app could use them similarly at will.

The Twitter apps don't use the OOB flow. They use xAuth password exchange "flow".

Re: Consumer key/secret for official Twitter clients

#72
post #45
post #17

Earlier quoted context omitted.

It's not really fair to call this an OAuth flaw, since it's just another instance of the 'trusted client' problem in security. Essentially it's impossible to differentiate Twitter's own client on an untrusted platform since it will always be possible for 'malicious' client to behave exactly like Twitter's own client.

IMHO OAuth doesn't work for desktop applications because all the aspects where it tries to provide more security than traditional username/password authentication are easily circumvented on the desktop. As such OAuth on the desktop IMHO is not much more than snake oil and does nothing aside of increasing the complexity for the implementer while providing next to zero additional security. First is client authenticatio…

That makes sense. Is there a better way for users to use a “desktop” (non-web) third-party app without handing out their username and password?

Re: Consumer key/secret for official Twitter clients

#74
post #16

Earlier quoted context omitted.

It would be possible to obfuscate a secret by storing it in several parts and combining them at run time. Still very far from secure, but this would require much more effort to extract the secret from the app. Anyone: what is best practice here (Android and/or iOS)? Edit: Storing application secrets in Android's credential storage [1]. I have no idea how secure this actually is. Should I obfuscate OAuth consumer secr…

Correct me if I'm wrong here but I believe that then all one would need to do is stick an SSL intercepting proxy (such as http://mitmproxy.org/doc/ssl.html ) in the middle and get the keys from there.

Incorrect. The consumer-secret and access-token-secret are not transmitted from client to the server during oauth. They are only used to sign requests.

Re: Consumer key/secret for official Twitter clients

#76
post #58
post #50

Earlier quoted context omitted.

The client can intercept whatever URL the embedded webview is redirected to. The callback URL provides no security against this.

That's not a drive-by hijack, all bets are off when it comes to apps. For all you know the app is presenting a fake login dialog. It would be a drive-by hijack on the web because there's a good chance you're already authenticated with Twitter and the callback cycle will automatically grant credentials on your behalf to the requester with no prompt.

Right - we were discussion OAuth in the context of client apps.

Re: Consumer key/secret for official Twitter clients

#77

Earlier quoted context omitted.

Couldn't another app use these tokens and take advantage of lax api limits ?

Twitter did this to themselves. Without the limit, this information is worthless. It'll make sense for an app like Tweetro[1] to add custom token as a feature or easter egg. 1: http://www.theverge.com/2012/11/11/3631108/tweetro-user-toke...

> Without the limit, this information is worthless.

Not true. Say you have a malicious Twitter client app that posts "Lose Weight In 30 days! ." Normally, Twitter could shut this offending app down by rejecting their client ID/secret; if they're using the official Twitter creds though, doing so would shut down all official Twitter apps in the process.

Re: Consumer key/secret for official Twitter clients

#78

what's wrong with making the oauth_callback parameter not override whatever you put in Twitter? wouldn't this fix the problem?

Yes, but break a lot of other apps that happen to use different domains/pages for different contexts (mobile, desktop, etc).

Re: Consumer key/secret for official Twitter clients

#79

Earlier quoted context omitted.

Couldn't another app use these tokens and take advantage of lax api limits ?

Twitter did this to themselves. Without the limit, this information is worthless. It'll make sense for an app like Tweetro[1] to add custom token as a feature or easter egg. 1: http://www.theverge.com/2012/11/11/3631108/tweetro-user-toke...

They already have spam systems in place to catch repetitive spam tweets and block them.
Post reply on HN