• Home
  • Cyber Crime
  • Cyber warfare
  • APT
  • Data Breach
  • Deep Web
  • Digital ID
  • Hacking
  • Hacktivism
  • Intelligence
  • Internet of Things
  • Laws and regulations
  • Malware
  • Mobile
  • Reports
  • Security
  • Social Networks
  • Terrorism
  • ICS-SCADA
  • POLICIES
  • Contact me
MUST READ

Italian police arrested a Chinese national suspected of cyberespionage on a U.S. warrant

 | 

U.S. CISA adds MRLG, PHPMailer, Rails Ruby on Rails, and Synacor Zimbra Collaboration Suite flaws to its Known Exploited Vulnerabilities catalog

 | 

IT Worker arrested for selling access in $100M PIX cyber heist

 | 

New Batavia spyware targets Russian industrial enterprises

 | 

Taiwan flags security risks in popular Chinese apps after official probe

 | 

U.S. CISA adds Google Chromium V8 flaw to its Known Exploited Vulnerabilities catalog

 | 

Hunters International ransomware gang shuts down and offers free decryption keys to all victims

 | 

SECURITY AFFAIRS MALWARE NEWSLETTER ROUND 52

 | 

Security Affairs newsletter Round 531 by Pierluigi Paganini – INTERNATIONAL EDITION

 | 

North Korea-linked threat actors spread macOS NimDoor malware via fake Zoom updates

 | 

Critical Sudo bugs expose major Linux distros to local Root exploits

 | 

Google fined $314M for misusing idle Android users' data

 | 

A flaw in Catwatchful spyware exposed logins of +62,000 users

 | 

China-linked group Houken hit French organizations using zero-days

 | 

Cybercriminals Target Brazil: 248,725 Exposed in CIEE One Data Breach

 | 

Europol shuts down Archetyp Market, longest-running dark web drug marketplace

 | 

Kelly Benefits data breach has impacted 550,000 people, and the situation continues to worsen as the investigation progresses

 | 

Cisco removed the backdoor account from its Unified Communications Manager

 | 

U.S. Sanctions Russia's Aeza Group for aiding crooks with bulletproof hosting

 | 

Qantas confirms customer data breach amid Scattered Spider attacks

 | 
  • Home
  • Cyber Crime
  • Cyber warfare
  • APT
  • Data Breach
  • Deep Web
  • Digital ID
  • Hacking
  • Hacktivism
  • Intelligence
  • Internet of Things
  • Laws and regulations
  • Malware
  • Mobile
  • Reports
  • Security
  • Social Networks
  • Terrorism
  • ICS-SCADA
  • POLICIES
  • Contact me
  • Home
  • Hacking
  • Abusing Facebook Access Token with Man-in-the-Middle Attack

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

Pierluigi Paganini March 12, 2014

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)


facebook linkedin twitter

access token Facebook Hacking man-in-the-middle open url redirection social media spear phishing targeted attacks watering hole

you might also like

Pierluigi Paganini July 08, 2025
U.S. CISA adds MRLG, PHPMailer, Rails Ruby on Rails, and Synacor Zimbra Collaboration Suite flaws to its Known Exploited Vulnerabilities catalog
Read more
Pierluigi Paganini July 07, 2025
U.S. CISA adds Google Chromium V8 flaw to its Known Exploited Vulnerabilities catalog
Read more

leave a comment

newsletter

Subscribe to my email list and stay
up-to-date!

    recent articles

    Italian police arrested a Chinese national suspected of cyberespionage on a U.S. warrant

    Intelligence / July 08, 2025

    U.S. CISA adds MRLG, PHPMailer, Rails Ruby on Rails, and Synacor Zimbra Collaboration Suite flaws to its Known Exploited Vulnerabilities catalog

    Hacking / July 08, 2025

    IT Worker arrested for selling access in $100M PIX cyber heist

    Cyber Crime / July 08, 2025

    New Batavia spyware targets Russian industrial enterprises

    Malware / July 07, 2025

    Taiwan flags security risks in popular Chinese apps after official probe

    Security / July 07, 2025

    To contact me write an email to:

    Pierluigi Paganini :
    pierluigi.paganini@securityaffairs.co

    LEARN MORE

    QUICK LINKS

    • Home
    • Cyber Crime
    • Cyber warfare
    • APT
    • Data Breach
    • Deep Web
    • Digital ID
    • Hacking
    • Hacktivism
    • Intelligence
    • Internet of Things
    • Laws and regulations
    • Malware
    • Mobile
    • Reports
    • Security
    • Social Networks
    • Terrorism
    • ICS-SCADA
    • POLICIES
    • Contact me

    Copyright@securityaffairs 2024

    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
    Cookie SettingsAccept All
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities...
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT