SBN

AI Sidebar Spoofing: Malicious Extensions Impersonates AI Browser Interface

A few weeks ago, we released a series of attacks that tricked Comet into exfiltrating data, downloading malicious files and providing unauthorized access to enterprise apps, all without the victim’s knowledge. The research highlights the lack of security awareness AI browsers have, and the importance of reimagining security to take into account agentic identities and agentic workflows. The full tech blog for these attacks can be accessed here.

This research takes a look at how attackers can exploit the very medium that users use to interact with AI Browsers — the AI sidebar. Whether it’s a simple summarization command or a more complex agentic task, the user “tells” the AI browser what to do via the AI sidebar. In fact, the AI sidebar has become the characteristic trait for an AI browser, one which users visually associate and thus trust as much as the AI browser itself.

What if an attacker could mimic the AI sidebar? What if this fake AI sidebar spews out fake instructions that lead users to perform malicious tasks? This is exactly what happens in the AI Sidebar Spoofing attack, where a malicious extension impersonates Comet’s AI sidebar, tricking users to navigate to malicious websites, run data exfiltration commands and even install backdoors that provide attackers with persistent remote access to the victim’s entire machine.

This blog will cover three case studies of AI Sidebar Spoofing attacks, and how they impact individuals and organizations. However, it is important to note that we are just at the tip of the iceberg and that AI Sidebar Spoofing will come in various forms. In fact, while we have used Comet for demonstration purposes, other AI browsers and consumer browsers with AI sidebars like Brave and Edge are likely to be equally susceptible to AI Sidebar Spoofing attacks.

Responsible Disclosure: We have reached out to Perplexity to disclose the AI Sidebar Spoofing attack, however we have not received a response.

AI Sidebar Spoofing Attacks

There are three key parts to the AI Sidebar Spoofing attack:

1. Installing a malicious extension

First, the victim installs the malicious extension that will perform the AI Sidebar Spoofing Attack. This could be:

  • A malicious extension disguised as legitimate extension (e.g. password managers, AI/productivity extensions)
  • A legitimate extension that was compromised by an attacker (e.g. Cyberhaven, Geco Colorpick)
  • A legitimate extension that was purchased by an attacker (e.g. Great Suspender)

There have been many cases of even Chrome featured extensions turning out to be malicious. Unfortunately, most organizations do not perform regular audits of installed extensions, if at all. This article will therefore not focus on how the user ends up installing the AI Sidebar Spoofing extension as any disguised, compromised or attacker owned extension can be used to perform the attack. Rather, we will focus on its potency and impact once it is installed.

2. AI Sidebar Spoofing

Once the victim opens a new browser tab, the extension can inject javascript into the web page to create a fake sidebar that looks exactly the same as the AI Browser’s sidebar. Since there is no visual and workflow difference between the spoofed and real AI sidebar, the user will likely believe that they are interacting with the real AI Browser sidebar.

Note that the AI Sidebar Spoofing attack only requires host and storage permissions, which are common permissions that are also found in Grammarly and password manager extensions.

3. Tricking Users into Performing Malicious Tasks

Once the user enters a prompt into the spoofed AI sidebar, the extension hooks into its LLM (in this case Gemini) to generate a response. However, the key difference is when it detects prompts that requests for certain instructions/guides, it will manipulate the responses to include malicious steps that the user will then execute. For example:

AI is a massive enabler for people to learn new skills and perform tasks that would previously take a significant time to learn. However, one side effect of this is that there are hundreds of thousands of people who are blindly following instructions generated by AI, without the skillset to sense-check whether the task is necessary or comes with any security risk. This is what the AI Sidebar Spoofing attack exploits.

Are extensions the only way to execute an AI Sidebar Spoofing Attack?

No — it is also possible for malicious sites to have a spoofed AI sidebar natively. However, we have chosen to focus on extension-based AI Sidebar Spoofing because it can be executed on any site without needing the users to land on the attacker’s website. This makes for a much more insidious and powerful attack that can be executed anytime, anywhere.

Case Study: Crypto Wallet Phishing

  1. User installs AI Sidebar Spoofing extension, disguised as an AI marketing tool

2. The AI Sidebar Spoofing extension injects a spoofed sidebar into the page. Here, the user prompts it for a step by step guide to sell crypto from their Binance account

3. The AI Sidebar returns a very convincing set of instructions. However, instead of a link to Binance’s login page, it provides the attacker’s phishing site with the typosquatted domain binacee

4. The user navigates to the phishing site as per the instructions, which looks like Binance’s legitimate login page. The user enters their credentials, which is then used by the attacker to login to the victim’s real Binance account to steal their cryptocurrency. Such phishing sites can also be hosted using tools like Evilginx to bypass MFA.

Note that attackers may even include convincing elements like CAPTCHA to make it appear more “secure”:

Case Study: Consent Phishing (OAuth Attack)

  1. Malicious extension injects a script to create a spoofed AI Sidebar. The user asks it to recommend file sharing sites.

2. The spoofed AI sidebar returns some options, with links to its own “file sharing app”

3. The user navigates to the attacker’s site and clicks Sign in with Google

4. The user is redirected to Google’s OAuth page, where the “file sharing app” requests for full access to the user’s Google Drive and Gmail

5. The user is logged on to the attacker’s functional file sharing service, unaware they have fallen prey to an OAuth attack

6. The attacker now has full access to the user’s Gmail and Google Drive, allowing them to send malicious emails on their behalf and exfiltrate all files on the drive

Case Study: Device Hijacking

  1. Malicious extension injects a script that displays the spoofed AI sidebar. Thinking that this is Comet’s AI Sidebar, the user enters the prompt “How to install homebrew”

2. The spoofed AI sidebar returns a response generated by their LLM (in this case Gemini). Most of the instructions to install Homebrew are logical and correct, except for the installation command line, which is replaced with a reverse shell command (partially base64 encoded) that will connect the victim’s device to the attacker’s server and provide the attacker a system shell to execute commands.

The same impact can be achieved by suggesting installation of malicious packages as software dependencies and then providing the real non-malicious install command.

3. Following the AI sidebar’s instruction, the user pastes the reverse shell command to their terminal, thinking that they are installing Homebrew.

4. The attacker can now run commands on the victim’s device to exfiltrate data, monitor activities, install advanced RAT/backdoor and even deploy ransomware. In the screenshot below, as an example the attacker is accessing a sensitive file containing the victim’s credit card information.

Protecting Against AI Sidebar Spoofing Attacks

There are three ways to think about protecting against AI Sidebar Spoofing Attacks:

Restricting AI Browser Usage

As with all threat vectors, one option is to completely restrict usage of AI Browsers. If there are no AI Browsers, there can be no AI Sidebar Spoofing Attacks. However, this is unlikely to be a practical solution for most organizations as (i) most organizations do not have the means to manage what browsers can be installed, especially on BYOD devices and (ii) it will be faced with significant resistance from employees.

Critically, the browser landscape in its entirety is going through a significant landscape change with consumer browsers like Chrome, Edge, Brave and Firefox releasing their own AI sidebar/popup, making them all potentially vulnerable to the AI Sidebar Spoofing attack.

Audit & Block AI Sidebar Spoofing Extensions

The AI Sidebar Spoofing attacks discussed in this blog are all executed by malicious extensions. Thus, it is critical for enterprises to perform regular audits of all extensions installed by employees, blocking any extensions that inject spoofed AI sidebars onto pages. To identify spoofing behavior, simple metadata analysis (e.g. user reviews, no. of downloads, permissions) is unlikely to be sufficient. Instead, dynamic analysis of the extension needs to be performed to see how the extension behaves at runtime.

Block Malicious Actions

As briefly discussed, it is also possible for the AI Sidebar Spoofing Attack to happen via a malicious site. Whether it is through an extension or malicious site, it is also critical to set granular brower-native policies that prevent users from carrying out the malicious tasks instructed by the fake AI sidebar as an extra layer of defense. For example:

  • For the crypto phishing case study, a policy could be set to block advanced phishing sites based on advanced ML and page heuristic analysis
  • For the OAuth attack case study, a policy could be set to block high risk permissions from being granted to non-whitelisted apps
  • For the device hijacking case study, a policy could be set to warn users and block copy of malicious/risky Linux commands

The SquareX Solution

SquareX’s extension turns any browser on any device into an enterprise-grade secure browser. SquareX is the only solution that combines all three key components of browser security in a single platform:

  • Browser Detection and Response to detect & mitigate web attacks on users and agentic workflows including identity attacks, malicious extensions advanced spearphishing attacks and malicious files
  • Enterprise Browser to provide secure access to enterprise apps including VDI reduction, BYOD, 3rd party contractors and remote workers
  • Browser DLP including GenAI DLP, clipboard DLP, file DLP, insider attacks and data exfiltration attacks for both user and agentic DLP

The lightweight browser extension that is compatible with all major popular browsers including Chrome, Edge, Safari, Firefox and AI Browsers like Comet and can be easily deployed across both managed and unmanaged devices.

Get A Free Enterprise-wide Extension Audit

SquareX offers a free enterprise-wide extension audit. The audit involves conducting an extensive audit of all extensions installed across the organization using all three components of the SquareX Extension Analysis Framework. Within 24 hours, enterprises can get a full analysis of their organization’s extension risk posture, including a risk score for every extension installed. Visit sqrx.com to learn more.

SquareX’s browser extension inspects all new and updated extensions across all browser extension stores using a proprietary Extension Analysis Framework, a 3-layer approach to extension analysis — Metadata Analysis, Advanced Static Code Analysis and Dynamic Analysis.


AI Sidebar Spoofing: Malicious Extensions Impersonates AI Browser Interface was originally published in SquareX Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.