Europe Confirms Record €4.1B Penalty Against Google for Android Practices|U.S. CISA adds a Microsoft SharePoint Server flaw to its Known Exploited Vulnerabilities catalog|430,000 FortiGate Devices Exposed in FortiBleed Ransomware Link|Adobe fixed multiple maximum-severity flaws in ColdFusion and Campaign Classic|Alleged Scattered Spider Hacker Extradited to U.S. to Face Cybercrime Charges|Oracle E-Business Suite Flaw Under Active Attack, 950 Systems Exposed|Azure CLI Targeted in LSHIY Password Spray Campaign Across 64 Orgs|CISA Warns BlueHammer Flaw Is Now Exploited in Ransomware Attacks|RustDuck: The Botnet That’s Still Small but Engineering Like It Plans to Grow|GuardFall Flaw Hits 10 of 11 Popular Open-Source AI Agents|XSS.is, The Forum That Ran the Ransomware Supply Chain Is Down. The Market Isn’t|U.S. CISA adds SimpleHelp flaw to its Known Exploited Vulnerabilities catalog|Europe Confirms Record €4.1B Penalty Against Google for Android Practices|U.S. CISA adds a Microsoft SharePoint Server flaw to its Known Exploited Vulnerabilities catalog|430,000 FortiGate Devices Exposed in FortiBleed Ransomware Link|Adobe fixed multiple maximum-severity flaws in ColdFusion and Campaign Classic|Alleged Scattered Spider Hacker Extradited to U.S. to Face Cybercrime Charges|Oracle E-Business Suite Flaw Under Active Attack, 950 Systems Exposed|Azure CLI Targeted in LSHIY Password Spray Campaign Across 64 Orgs|CISA Warns BlueHammer Flaw Is Now Exploited in Ransomware Attacks|RustDuck: The Botnet That’s Still Small but Engineering Like It Plans to Grow|GuardFall Flaw Hits 10 of 11 Popular Open-Source AI Agents|XSS.is, The Forum That Ran the Ransomware Supply Chain Is Down. The Market Isn’t|U.S. CISA adds SimpleHelp flaw to its Known Exploited Vulnerabilities catalog|
Advertisement

Ad Placeholder

Full Width × 90

Hacking

Abusing Facebook Access Token with Man-in-the-Middle Attack

The Egyptian penetration tester Ahmed Elsobky discovered a serious flaw that allows attackers to sniff user’s traffic including access token. Facebook is vulnerable to Man-in-the-Middle Attack, The Egyptian penetration tester Ahmed Elsobky discovered a serious flaw that allows attackers to sniff user’s traffic including private information. “We’d actually received an earlier report from another researcher regarding this […]

Abusing Facebook Access Token with Man-in-the-Middle Attack

The Egyptian penetration tester Ahmed Elsobky discovered a serious flaw that allows attackers to sniff user’s traffic including access token.

Facebook is vulnerable to Man-in-the-Middle Attack, The Egyptian penetration tester Ahmed Elsobky discovered a serious flaw that allows attackers to sniff user’s traffic including private information.
We’d actually received an earlier report from another researcher regarding this same issue. In response to that report, we’ve been working on limiting this behavior when it comes to our official apps, since they’re pre-authorized. For other apps, unfortunately, fully preventing this would mean requiring any site integrating with Facebook to use HTTPS, which simply isn’t practical for right now.” reported Facebook security team.
In the past we have already examined Open URL Redirection url flaws in Facebook platform, similar bugs allow third-party applications to expose the user’s access token at risk. This time the Facebook vulnerability could be exploited by hackers to steal user’s access token which stores information about permissions that have been granted as well as information about the token itself (e.g. Expiration, app generated it). Resuming access tokens allow attackers to access the victim’s data and perform any actions on behalf of the user.
Ahmed Elsobky reported the vulnerability on 5th September 2013, the requirements for the exploit are:

  • The victim must be using a Facebook application(except: Facebook Messenger, Facebook Camera, Facebook for android/ios/symbian since these are pre-authorized apps).
  • The victim must be already logged in and the attacker must be a Man In The Middle!

Let’s assume that the victim is using Skype then the attacker can get an access_token with the full permissions of that application by injecting this basic iframe into any webpage that the victim visits:

 <iframe src=https://www.facebook.com/dialog/oauth?redirect_uri=http%3A%2F%2Flogin.skype.com%2Flogin%2Foauth%3Fapplication%3Daccount&client_id=260273468396&response_type=token width=0 height=0>

“Facebook will accept the HTTP link at the redirect_uri parameter so a GET request would be sent and the user/victim will get a 302 redirect to that HTTP URL with the access_token value of the application with all of its permissions! Then It’s done now and an access token with expires=[the current expiry value]  (usually it’s 0 with Skype and 0=never) is coming for you now to intercept and exploit!> very easy, isn’t it?” reported the expert’s post.

In general an attacker can use this URL/vector (http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&response_type=token&client_id=[app_id]) as redirect_uri parameter.

The problem is that Facebook allows the HTTP version of the Canvas URL to be used even if the app already has an HTTPS URI (i.e Although Skype has a HTTPS Canvas URL, Facebook allows the HTTP link in redirect_uri parameter) and also Facebook allows the request without any special tokens so anyone can make a request.

hacking facebook access token

Facebook users can prevent Man-In-The-Middle attacks using HTTPS to encrypt traffic that contains sensitive information and following penetration tester’s suggestions:

1- Use “HTTPS Everywhere” Browser Extension(https://www.eff.org/https-everywhere)
2- Don’t use any popular app that doesn’t use a SSL (Secure Socket Layer) because HTTPS Everywhere won’t help you in this case then!

Facebook app developers should never send an access token over unencrypted channel and Facebook users should only trust the encrypted apps and use “HTTPS Everywhere” Browser Extension for automated security.

Pierluigi Paganini

(Security Affairs – Facebook Access Token , hacking)