News for hackers. Stuff that matters.
Re:Facebook bans KDE application, deletes user photos by fleitz on Tuesday June 28, 2011 @03:27AM (#2704420)
How exactly does one solve this issue?

Facebook's auth/app system makes a whole lot of sense for web sites but zero sense for desktop/mobile apps.

The app is not insecure, how does exposing two keys endanger ANY user data?

iPhone apps have the EXACT same issue, as this application, give me an IPA file and I'll give you the app's keys. Look at Facebook's official docs and they recommend embedding the keys into the app in this manner.

Re:Facebook bans KDE application, deletes user photos by teej on Tuesday June 28, 2011 @03:29AM (#2704427)
They have a special desktop API that solves this exact issue.

EDIT: they used to, at least. They now want devs to use the web OAuth flow by adding an embedded web view to your desktop app. http://developers.facebook.com/docs/authentication/

Re:Facebook bans KDE application, deletes user photos by fleitz on Tuesday June 28, 2011 @03:40AM (#2704458)
How does using the OAuth flow on a desktop app solve any of these issues?

If you have the app binary, you have the secret key. It's simply a matter of attaching a debugger and waiting for the URL handler to be called. Even the trick auth flow on iphone where it opens the Facebook app has the same vulnerability.

Re:Facebook bans KDE application, deletes user photos by nl on Tuesday June 28, 2011 @11:51AM (#2705850)
If you have the app binary, you have the secret key.

No, you have the access token. There's a big difference.

It's simply a matter of attaching a debugger and waiting for the URL handler to be called. Even the trick auth flow on iphone where it opens the Facebook app has the same vulnerability.

Yep, you can do that. But then all you know how to authorize the app to act on your (the logged on user) behalf. You can write another application that pretends to be that app, but since it acts on your behalf I'm not sure that's a big risk.

In the case of this KDE program, not only do you know how to make the app act on your behalf - but (as the OP noted) - it is probably possible to make the application act on behalf of any other user that has authorized this application id. That's a pretty bad problem.

It sucks for the legitimate users who uploaded the pics using it, but who knows what else got uploaded to other people's accounts using this program? I suspect that's the reason why Facebook didn't just bad the app, but had to delete pics as well.

Re:Facebook bans KDE application, deletes user photos by saurik on Tuesday June 28, 2011 @03:46AM (#2704481)
The OAuth 2.0 flow, as far as I can tell, does not require you distributing your secret key, which is what this application was doing. From Facebook's documentation:

"The app secret is available from the Developer App and should not be shared with anyone or embedded in any code that you will distribute (you should use the client-side flow for these scenarios)."

Re:Facebook bans KDE application, deletes user photos by nknight on Tuesday June 28, 2011 @03:36AM (#2704447)
The report the KDE devs filed ( http://bugs.developers.facebook.net/show_bug.cgi?id=18701 ) addresses this directly:

  The way OAuth2 is handled by your platform allows in principle anyone to
  impersonate our application, as all that's needed is getting to know our
  application ID, which can be easily obtained from the URL of the application
  page. If you feel our application has been used to send spam to other users, it
  has certainly not been done by our code.
Re:Facebook bans KDE application, deletes user photos by saurik on Tuesday June 28, 2011 @03:42AM (#2704471)
While this is true, having opted to /not/ use the OAuth 2.0 flow (which at least limits you to having access only to the access_token for that one user) and instead distributing the access/secret key for the app (which is what this developer decided to do instead) is so much less secure that I don't have much sympathy this developer in his complaint that Facebook doesn't really support desktop apps (which is, honestly, a hard problem).
Re:Facebook bans KDE application, deletes user photos by arcs on Tuesday June 28, 2011 @04:01AM (#2704519)
Correct me if I'm wrong, but it seems that while using the client-side auth flow does not prevent a malicious program from pretending to be another facebook app, it forces the malicious application to be downloaded and executed as it must be able to catch the redirect to a different url with the access token, which a web app cannot do.

Once you are downloading and executing a malicious native app, you're screwed anyways since it can do whatever it wants like read your cookies and hijack running applications... (I'm not considering java or flash applets, depending on how their security works this may still allow drive-by spammage as a legit app).

It does allow a malicious user to easily write something that impersonates a legit application, though it's limited to spamming his own account.