Sign in
  • Home
  • About Us
  • Services
    • Email Archive Service
    • Messaging Security Service
    • Malware Protection Security Service
    • SIEM & Cybersecurity Operations Centre (CSOC) Services
    • Backup Service
  • Solutions
    • Cybersecurity
    • Connectivity, Voice & Hosting
    • Managed IT Services
    • Enterprise Content & Information Management
  • Cyber News
  • Contacts
Sign in
Welcome!Log into your account
Forgot your password?
Password recovery
Recover your password
Search
Sign in
Welcome! Log into your account
Forgot your password? Get help
Password recovery
Recover your password
A password will be e-mailed to you.
Dataproof Communications
  • Home
  • About Us
  • Services
    • Email Archive Service
    • Messaging Security Service
    • Malware Protection Security Service
    • SIEM & Cybersecurity Operations Centre (CSOC) Services
    • Backup Service
  • Solutions
    • Cybersecurity
    • Connectivity, Voice & Hosting
    • Managed IT Services
    • Enterprise Content & Information Management
  • Cyber News
  • Contacts
Home Cyber News Mapping Communication Between Facebook Accounts Using a Browser-Based Side Channel Attack
  • Cyber News
  • Imperva

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

By
Editor Dataproof
-
07/03/2019
0
1412
Share on Facebook
Tweet on Twitter

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.

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.

– Read more

  • TAGS
  • Application Delivery
  • application state
  • browser
  • CSFL
  • Facebook
  • Facebook Messenger
  • iframe
  • metadata
  • Research & Reports
  • side channel attack
  • vulnerability
SHARE
Facebook
Twitter
  • tweet
Previous articleFinancial Cyberthreats in 2018
Next article[Case Study] Preventing Information Security Silos
Editor Dataproof

RELATED ARTICLESMORE FROM AUTHOR

Cyber News

Hackers Compromise Trivy Scanner to Inject malicious Scripts and Steal Login Credentials

Cyber News

Trivy vulnerability scanner backdoored with credential stealer in supply chain attack

Cyber News

Metasploit Wrap-Up 03/20/2026

Cyber News

Fake ‘Trusted Sender’ Labels Misused in New Apple Mail Phishing Scheme

Cyber News

CVE-2026-26118 Azure MCP Server Tools Elevation of Privilege Vulnerability

Cyber News

mod_gnutls Multiple Vulnerabilities

RSS Security Awareness Tips

Latest article

Hackers Compromise Trivy Scanner to Inject malicious Scripts and Steal Login Credentials

Cyber News Editor Dataproof - 21/03/2026
0
A sophisticated supply chain attack targeting the official Trivy GitHub Action (aquasecurity/trivy-action) has compromised continuous integration and continuous deployment (CI/CD) pipelines globally. Disclosed...

Trivy vulnerability scanner backdoored with credential stealer in supply chain attack

Cyber News Editor Dataproof - 21/03/2026
0
Attackers have compromised the widely used open-source Trivy vulnerability scanner, injecting credential-stealing malware into official releases and GitHub Actions used...

Metasploit Wrap-Up 03/20/2026

Cyber News Editor Dataproof - 20/03/2026
0
♫ I Just Called ♫ To Say ♫ 7f45 4c46 0201 0100 0000 0000 0000 0000 0300 3e00 0100♫This release contains 2 new exploit modules,...

Fake ‘Trusted Sender’ Labels Misused in New Apple Mail Phishing Scheme

Cyber News Editor Dataproof - 20/03/2026
0
Fake “trusted sender” labels can mislead users, as scammers embed them into email bodies to disguise phishing emails and create a false sense of...

EDITOR PICKS

Hackers Compromise Trivy Scanner to Inject malicious Scripts and Steal Login...

21/03/2026

Trivy vulnerability scanner backdoored with credential stealer in supply chain attack

21/03/2026

Metasploit Wrap-Up 03/20/2026

20/03/2026

Find us

Dataproof Communications
Block 09 Pinewood Office Park
33 Riley Road
Woodmead 2128
South Africa
Phone: 011 032 7700
Fax: 011 032 7788

POPULAR POSTS

Threats to users of adult websites in 2018

21/02/2019

The World’s Most Popular Coding Language Happens to be Most Hackers’...

26/09/2018

IT threat evolution Q2 2019

19/08/2019

Operating Hours

Monday08:00 - 17:00
Tuesday08:00 - 17:00
Wednesday08:00 - 17:00
Thursday08:00 - 17:00
Friday08:00 - 17:00

POPULAR CATEGORY

  • Cyber News1554
  • Tech News1190
  • Kaspersky165
  • Imperva149
  • Tripwire101
  • Centrify97
  • Infoblox72
  • RecodedFuture49
  • Rapid749

Equity and Structure

The company has a level 2 B-BEE rating with 63% black ownership, with a team of passionate professionals with over 30 years of experience in ICT industry. Our vision is to be a world class leader in cyber security incident management and response solutions.

ABOUT US
DataProof Communications is Cybersecurity Company incorporated in 2014 specialising in cybersecurity operations, incident management and response best practices and technologies. DataProof’s objective is to provide comprehensive cybersecurity solutions through people, processes and technology to help organisations protect the confidentiality, integrity and availability of their ICT assets.
Contact us: info@dataproof.co.za
  • Home
  • About Us
  • Services
    • Email Archive Service
    • Messaging Security Service
    • Malware Protection Security Service
    • SIEM & Cybersecurity Operations Centre (CSOC) Services
    • Backup Service
  • Solutions
    • Cybersecurity
    • Connectivity, Voice & Hosting
    • Managed IT Services
    • Enterprise Content & Information Management
  • Cyber News
  • Contacts
© Dataproof Communication 2018
MORE STORIES

Hackers Compromise Trivy Scanner to Inject malicious Scripts and Steal Login...

21/03/2026

Trivy vulnerability scanner backdoored with credential stealer in supply chain attack

21/03/2026

Metasploit Wrap-Up 03/20/2026

20/03/2026
Edit with Live CSS
Save
Write CSS OR LESS and hit save. CTRL + SPACE for auto-complete.