Sunday, May 11, 2025

Security Boulevard Logo

Security Boulevard

The Home of the Security Bloggers Network

Community Chats Webinars Library
  • Home
    • Cybersecurity News
    • Features
    • Industry Spotlight
    • News Releases
  • Security Creators Network
    • Latest Posts
    • Syndicate Your Blog
    • Write for Security Boulevard
  • Webinars
    • Upcoming Webinars
    • Calendar View
    • On-Demand Webinars
  • Events
    • Upcoming Events
    • On-Demand Events
  • Sponsored Content
  • Chat
    • Security Boulevard Chat
    • Marketing InSecurity Podcast
    • Techstrong.tv Podcast
    • TechstrongTV - Twitch
  • Library
  • Related Sites
    • Techstrong Group
    • Cloud Native Now
    • DevOps.com
    • Security Boulevard
    • Techstrong Research
    • Techstrong TV
    • Techstrong.tv Podcast
    • Techstrong.tv - Twitch
    • Devops Chat
    • DevOps Dozen
    • DevOps TV
  • Media Kit
  • About
  • Sponsor

  • Analytics
  • AppSec
  • CISO
  • Cloud
  • DevOps
  • GRC
  • Identity
  • Incident Response
  • IoT / ICS
  • Threats / Breaches
  • More
    • Blockchain / Digital Currencies
    • Careers
    • Cyberlaw
    • Mobile
    • Social Engineering
  • Humor
SBN News Security Bloggers Network 

Home » Cybersecurity » SBN News » Mapping Communication Between Facebook Accounts Using a Browser-Based Side Channel Attack

SBN

Mapping Communication Between Facebook Accounts Using a Browser-Based Side Channel Attack

by Ron Masas on March 7, 2019

A now-patched vulnerability in the web version of Facebook Messenger allowed any website to expose who you have been messaging with.

In a previous post, I showed how your Facebook likes, location history, and other metadata could have been extracted from your Facebook account using a side-channel attack I named “Cross-Site Frame Leakage,” or CSFL for short.

In this post, I’ll formalize the CSFL attack, cover the latest enhancements to it, and review the vulnerability I disclosed to Facebook.

What is a CSFL Attack?

Cross-Site Frame Leakage is a side-channel attack, performed on an end user’s web browser, that exploits the cross-origin properties of iframe elements to determine the state of a vulnerable application.

Techstrong Gang Youtube
AWS Hub

What’s a state?

Take a search results page as an example. In terms of state, the most useful information the attacker could uncover would be whether or not a given query returned results.

If an attacker could determine the state of the search results page, he could probably infer other information about the currently logged user. Click on the short proof of concept video demonstrating this.


https://www.imperva.com/blog/wp-content/uploads/sites/9/2019/03/fb-messenger-poc-smaller.mp4

Identifying the Threat

Like many people, I use Facebook Messenger to communicate with my friends, family, and businesses. As happens with applications I regularly use, I felt the need to understand how Facebook Messenger works.

I started poking around the Messenger web application and noticed that iframe elements were dominating the user-interface. The chat box, as well as the contact list, were rendered in iframes, opening the possibility for a CSFL attack.

Like in the previous bug, I relied on the ability to count the number of iframes on a cross-origin page located on a background page that could be controlled by an attacker. However, in Messenger, there was no way to create search requests without user interaction. Additionally, unlike the previous bug, the iframe count always reached three once the page was fully loaded, eliminating the possibility to detect a “state” using the number of iframe elements.

I started digging into those three iframes, in order to understand how, why and when they are loaded. I decided to record the iframe count data over time for as many endpoints I could find, with the goal of uncovering interesting and detectable states.

After a few tests, I started looking into the conversation endpoint. I recorded “full state” data, meaning pages that would load my conversation with a user I’ve been in touch with, and some “empty state” data, showing conversations with users I’ve never contacted.

After looking at five examples, it was clear I was on to something. The “empty state” charts consistently produce an interesting pattern as you can see in the visualization below, and in proof of concept video above.

The top blue line is the iframe count for the empty state, the bottom red line is the count for the full state.

When the current user has not been in contact with a specific user, the iframe count would reach three and then always drop suddenly for a few milliseconds. This lets an attacker reliably distinguish between the full and empty states. This could let him remotely check if the current user has chatted with a specific person or business, which would violate those users’ privacy.

To summarize, by recording the frame count data over time, I found two new ways to leak cross-origin information. By looking at patterns instead of a static number, I was able to leak the “state” of a cross-origin window, either by analyzing the raw pattern or by timing certain “milestones” of the pattern.

Attack Flow

For this attack to work we need to trick a Messenger user into opening a link to our malicious site. Next, we need the user to click anywhere on the page. For example, this could be a video play button.

Once clicked, a new tab would open while keeping the previous one open in the background.

The new tab would start playing a video, keeping the user busy while we load the user messenger conversation endpoint in the background tab.

While Messenger loads in the background, we record the iframe count as I previously explained, allowing us to detect whether or not the current user has been in contact with specific users or Facebook Messenger bots.

Full POC script: https://gist.github.com/masasron/1beca41f42599db1c6d48a89e135f653

Mitigation

Having reported the vulnerability to Facebook under their responsible disclosure program, Facebook mitigated the issue by randomly creating iframe elements, which initially broke my proof of concept. However, after some work, I managed to adapt my algorithm and distinguish between the two states. I shared my finding with Facebook, who decided to completely remove all iframes from the Messenger user interface.

Closing Thoughts

Browser-based side-channel attacks are still an overlooked subject, while big players like Facebook and Google are catching up, most of the industry is still unaware.

I recently joined an effort to document those attacks and vulnerable DOM APIs, you can find more information on the xsleaks repository (currently still under construction).

As a researcher, it was a privilege to have contributed to protecting the privacy of the Facebook user community, as we continuously do for our own Imperva community.

The post Mapping Communication Between Facebook Accounts Using a Browser-Based Side Channel Attack appeared first on Blog.


Recent Articles By Author
  • Java(Script) Drive-By, Hacking Without 0days
  • ShadyShader: Crashing Apple M-Series Devices with a Single Click
  • Cursor’s Magic Comes with a Catch: The Trust Setting You’re Missing
More from Ron Masas

*** This is a Security Bloggers Network syndicated blog from Blog authored by Ron Masas. Read the original post at: https://www.imperva.com/blog/mapping-communication-between-facebook-accounts-using-a-browser-based-side-channel-attack/

March 7, 2019March 7, 2019 Ron Masas Application Delivery, application state, browser, CSFL, facebook, Facebook Messenger, iframe, metadata, Research & Reports, side-channel attack, vulnerability
  • ← SonicWall Extends SMB Cybersecurity Ambitions
  • The Future of IoT Security is in Your Hands | Avast →

Techstrong TV

Click full-screen to enable volume control
Watch latest episodes and shows

Upcoming Webinars

Software Supply Chain Security: Navigating NIST, CRA, and FDA Regulations
Is DevEx the Same as DevSecOps?

Podcast

Listen to all of our podcasts

Press Releases

GoPlus's Latest Report Highlights How Blockchain Communities Are Leveraging Critical API Security Data To Mitigate Web3 Threats

GoPlus’s Latest Report Highlights How Blockchain Communities Are Leveraging Critical API Security Data To Mitigate Web3 Threats

C2A Security’s EVSec Risk Management and Automation Platform Gains Traction in Automotive Industry as Companies Seek to Efficiently Meet Regulatory Requirements

C2A Security’s EVSec Risk Management and Automation Platform Gains Traction in Automotive Industry as Companies Seek to Efficiently Meet Regulatory Requirements

Zama Raises $73M in Series A Lead by Multicoin Capital and Protocol Labs to Commercialize Fully Homomorphic Encryption

Zama Raises $73M in Series A Lead by Multicoin Capital and Protocol Labs to Commercialize Fully Homomorphic Encryption

RSM US Deploys Stellar Cyber Open XDR Platform to Secure Clients

RSM US Deploys Stellar Cyber Open XDR Platform to Secure Clients

ThreatHunter.ai Halts Hundreds of Attacks in the past 48 hours: Combating Ransomware and Nation-State Cyber Threats Head-On

ThreatHunter.ai Halts Hundreds of Attacks in the past 48 hours: Combating Ransomware and Nation-State Cyber Threats Head-On

Subscribe to our Newsletters

ThreatLocker

Most Read on the Boulevard

Trump Proposes Cutting CISA Budget by $491 Million
Breaking the Password Barrier: FIDO’s Path to Seamless Security
Do the Math: Prime Number Breakthrough Could Upend Encryption 
SMBs Know They’re At Risk, but Most Aren’t Embracing AI
It’s a Mad, Mad World for DDoS; BGP Continues to Confound Security Teams 
Urgent Warning for Gmail Users: 1.8 Billion Accounts at Risk
The Rise of AI-Powered Bots in Payment Fraud & How FinTechs Can Protect Themselves
LockBit Ransomware Hacked: Database and Victim Chats Leaked
Indirect prompt injection attacks target common LLM data sources
RSAC Strategic Reel: Cyber experts on the front lines unpack ‘Shadow AI,’ ‘Ground Truth’

Industry Spotlight

SMBs Know They’re At Risk, but Most Aren’t Embracing AI
Cloud Security Cybersecurity Data Privacy Data Security Endpoint Featured Industry Spotlight Malware Mobile Security Network Security News Security Awareness Security Boulevard (Original) Social - Facebook Social - LinkedIn Social - X Spotlight Threat Intelligence 

SMBs Know They’re At Risk, but Most Aren’t Embracing AI

May 8, 2025 Jeffrey Burt | 2 days ago 0
U.S. Wins One, Maybe Two, Extradition Petitions in Unrelated Cases
Cloud Security Cyberlaw Cybersecurity Data Security Featured Identity & Access Industry Spotlight Malware Network Security News Security Awareness Security Boulevard (Original) Social - Facebook Social - LinkedIn Social - X Spotlight 

U.S. Wins One, Maybe Two, Extradition Petitions in Unrelated Cases

May 5, 2025 Jeffrey Burt | May 05 0
California Man Will Plead Guilty to Last Year’s Disney Hack
Cloud Security Cybersecurity Data Privacy Data Security Featured Identity & Access Industry Spotlight Malware Mobile Security Network Security News Security Boulevard (Original) Social - Facebook Social - LinkedIn Social - X Spotlight Threat Intelligence Threats & Breaches 

California Man Will Plead Guilty to Last Year’s Disney Hack

May 5, 2025 Jeffrey Burt | May 05 0

Top Stories

OpenText Report Shines Spotlight on Malware Infection Rates
Cybersecurity Data Security Featured News Ransomware Security Boulevard (Original) Social - Facebook Social - LinkedIn Social - X Spotlight 

OpenText Report Shines Spotlight on Malware Infection Rates

May 9, 2025 Michael Vizard | 1 day ago 0
Trump Proposes Cutting CISA Budget by $491 Million
Cloud Security Cyberlaw Cybersecurity Data Security Featured Mobile Security Network Security News Security Boulevard (Original) Social - Facebook Social - LinkedIn Social - X Spotlight 

Trump Proposes Cutting CISA Budget by $491 Million

May 7, 2025 Jeffrey Burt | 3 days ago 0
Spyware Maker NSO Ordered to Pay WhatsApp $168 Million for 2019 Hack
Cloud Security Cyberlaw Cybersecurity Data Privacy Data Security Featured Identity & Access Malware Mobile Security Network Security News Security Boulevard (Original) Social - Facebook Social - LinkedIn Social - X Spotlight 

Spyware Maker NSO Ordered to Pay WhatsApp $168 Million for 2019 Hack

May 7, 2025 Jeffrey Burt | 3 days ago 0

Security Humor

Randall Munroe’s XKCD ‘Globe Safety’

Randall Munroe’s XKCD ‘Globe Safety’

Download Free eBook

Managing the AppSec Toolstack

Security Boulevard Logo White

DMCA

Join the Community

  • Add your blog to Security Creators Network
  • Write for Security Boulevard
  • Bloggers Meetup and Awards
  • Ask a Question
  • Email: [email protected]

Useful Links

  • About
  • Media Kit
  • Sponsor Info
  • Copyright
  • TOS
  • DMCA Compliance Statement
  • Privacy Policy

Related Sites

  • Techstrong Group
  • Cloud Native Now
  • DevOps.com
  • Digital CxO
  • Techstrong Research
  • Techstrong TV
  • Techstrong.tv Podcast
  • DevOps Chat
  • DevOps Dozen
  • DevOps TV
Powered by Techstrong Group
Copyright © 2025 Techstrong Group Inc. All rights reserved.
×

Security in AI

Step 1 of 7

14%
How would you best describe your organization's current stage of securing the use of generative AI in your applications?(Required)
Have you implemented, or are you planning to implement, zero trust security for the AI your organization uses or develops?(Required)
What are the three biggest challenges your organization faces when integrating generative AI into applications or workflows? (Select up to three)(Required)
How does your organization secure proprietary information used in AI training, tuning, or retrieval-augmented generation (RAG)? (Select all that apply)(Required)
Which of the following kinds of tools are you currently using to secure your organization’s use of generative AI? (select all that apply)(Required)
How valuable do you think it would it be to have a solution that classifies and quantifies risks associated with generative AI tools?(Required)
What are, or do you think would be, the most important reasons for implementing generative AI security measures? (Select up to three)(Required)

×