DEF CON 33 Recon Village - Plug and Prey Scanning and Scoring Browser Extensions - Nishant Sharma

DDEFCONConference
396,000
696 views
11 likes
2 months ago
28:58

Description

Nishant Sharma and Shorya Prathap Singh present a framework for scanning and scoring browser extensions to detect malicious behavior. The talk details a six-pillar approach combining AI-driven dynamic analysis, metadata vetting, and delta monitoring to protect the modern browser endpoint.

Title: Plug and Prey: Unmasking the Hidden Dangers of Browser Extensions

Introduction

In the modern enterprise, the browser is no longer just an application; it is the operating system for work. With nearly 90% of business tasks performed within browser tabs, the traditional definition of the 'endpoint' has shifted. While security teams have spent decades perfecting EDR for the host OS, a massive blind spot has emerged: browser extensions. These small pieces of software possess immense power, often enjoying broad permissions to read and modify everything a user does online. At DEF CON 33, Nishant Sharma and Shorya Prathap Singh from SquareX revealed how the 'Plug and Play' nature of these tools has turned into a 'Plug and Prey' environment for users.

This post explores the research into extension-based malware, the architectural weaknesses of browsers, and a cutting-edge six-pillar framework for scanning and scoring the 150,000+ extensions currently available to users.

The New Malware Frontier

Browser extensions are essentially small applications running inside your browser. They are distributed as CRX files, which are simply renamed ZIP archives containing a manifest.json file, JavaScript service workers, and content scripts. Despite the security benefits of the 'Isolated World' model—which prevents JavaScript variable collisions between the page and the extension—these tools are remarkably invasive.

A single malicious extension can bypass Multi-Factor Authentication (MFA) by stealing session cookies, capture keystrokes on sensitive banking sites, or act as a persistent spyware agent. The researchers highlighted that in 2023 alone, Google removed 32 malicious extensions that had already racked up 75 million downloads. The risk is not just from overtly 'bad' extensions, but from 'benign' ones that are sold to malicious actors or compromised via supply chain attacks.

Technical Deep Dive: The Six Pillars of Extension Analysis

To combat this, the researchers proposed a comprehensive scoring system based on six distinct categories of analysis.

1. Context-Aware Permission Analysis

Permissions should follow the Principle of Least Privilege (PULP). However, many extensions request the cookies permission or <all_urls> access. The framework doesn't just flag these; it asks for justification. Does a 'Cookie Editor' need cookie access? Yes. Does a simple 'Calculator' or 'AI Prompt Generator' need it? Absolutely not.

2. Metadata and Reputation Vetting

Malicious actors often leave digital breadcrumbs. By performing WHOIS lookups on developer domains, analyzing the sentiment of reviews, and geolocating listed office addresses using Google Earth, the framework can identify high-risk developers. A developer listed in a residential area with a three-day-old domain is a significant red flag.

3. AI-Driven Code Analysis

Static Analysis Security Testing (SAST) often fails to understand intent. By passing extension code through LLMs and AI agents, the framework performs logic-based analysis. The AI can reason about why a script is attempting to stringify a DOM object and send it to an external endpoint, identifying malicious intent that pattern-matching might miss.

4. Composition and Obfuscation Detection

Sophisticated malware uses WebAssembly (WASM) or heavy obfuscation to hide its tracks. The framework analyzes the file composition of the extension. If a massive percentage of the codebase is hidden in a binary or obfuscated script, the 'risk score' increases significantly.

5. Dynamic Analysis via MITM Chromium

The 'crown jewel' of this research is a modified Chromium fork. Traditional sandbox analysis fails because extensions often wait for specific user interactions to trigger payloads. The researchers' fork acts as an internal MITM proxy, logging all chrome.* API calls and network requests. They deploy 'AI Agents' to simulate human behavior—clicking buttons, filling forms, and navigating sites—to coax the malware into revealing itself.

6. Delta Analysis

Extensions change over time. Delta analysis compares the codebase and behavior of Version A to Version B. If an update suddenly adds a remote connection to a new domain or requests new permissions, it is flagged for immediate review. This is the primary defense against 'extension buyouts' where legitimate tools are turned into malware overnight.

Real-World Impact: The Color Picker Case Study

The researchers demonstrated their framework against a 'Color Picker' extension that had over 100,000 installs. Initially benign, an update turned it into spyware. Using their Chromium MITM tool, they showed the extension silently reporting every URL the user visited back to a Command and Control (C2) server. While static analysis might have missed the dynamically generated domains used by the malware, the agentic simulation caught the behavior in real-time.

Mitigation and Defense

For defenders, the message is clear: you cannot trust the web store's vetting process alone.

  • Inventory: Audit all extensions currently installed in your environment.
  • Policy: Implement an allow-list for extensions rather than a block-list.
  • Monitoring: Use tools that provide visibility into browser-level events and API calls.
  • Vetting: Before approving an extension, perform a 'Delta' check if it has a long history and a sudden change in ownership or permissions.

Conclusion

As the browser continues to dominate the enterprise landscape, extension security is no longer optional. The work presented by Sharma and Singh provides a blueprint for how AI and modified browser engines can be used to reclaim the endpoint. By shifting from reactive blocking to proactive, multi-pillar scoring, organizations can allow their users the productivity of extensions without the 'Plug and Prey' consequences. Always remember: if the extension is free and requests broad permissions, you (and your data) are likely the product.

AI Summary

Nishant Sharma and Shorya Prathap Singh from SquareX address the growing threat landscape of browser extensions at DEF CON 33 Recon Village. They argue that the browser is the new primary endpoint, with over 90% of enterprise work occurring within it, making browser extensions a potent vector for spyware and supply chain attacks. The presentation begins by breaking down the anatomy of a browser extension, focusing on the `manifest.json` file, service workers (background scripts), and content scripts that interact with the Document Object Model (DOM). They explain the 'Isolated World' security model in Chromium, which prevents variable conflicts between the page and the extension but notes that content scripts still share the same renderer process as the tab. The core of the presentation is their multi-pillar analysis framework designed to categorize extensions as benign, risky, or malicious. The first pillar is Permission Analysis, which looks for risky permissions like `cookies` or broad host access and evaluates them against the extension's stated purpose. The second pillar, Metadata Analysis, involves vetting the developer's reputation, install counts, sentiment analysis of reviews, and even geolocating developer addresses via Google Earth to spot anomalies. The third pillar uses LLMs and AI agents for Code Analysis to understand logic and intent, going beyond traditional SAST tools. The fourth, Composition Analysis, detects suspicious use of WebAssembly (WASM) or obfuscated binaries. The most innovative aspect discussed is Dynamic Analysis. The researchers developed a modified Chromium fork that acts as a Man-in-the-Middle (MITM) proxy. This allows them to intercept API calls and network traffic directly within the browser, bypassing the need for traditional SSL interception. They use AI agents to perform 'agentic simulations'—human-like interactions designed to trigger malicious payloads that remain dormant during simple automated crawls. Finally, Delta Analysis tracks changes between extension updates to detect 'rogue' updates where a previously benign extension is sold or compromised to deliver malware. The talk concludes with a live demo of a malicious color picker extension with over 100,000 installs that functioned as spyware, illustrating how their dynamic analysis captures real-time data exfiltration to a command-and-control server.

More from this Playlist

DEF CON 33 Recon Village  - Mapping the Shadow War From Estonia to Ukraine -  Evgueni Erchov
20:47
Science & Technologyresearch-presentationhybridrussia
DEF CON 33 Recon Village - How to Become One of Them: Deep Cover Ops - Sean Jones, Kaloyan Ivanov
43:37
Science & Technologyresearch-presentationhybridhumint
DEF CON 33 Recon Village - Building Local Knowledge Graphs for OSINT - Donald Pellegrino
41:12
Science & Technologyresearch-presentationhybridosint
DEF CON 33  Recon Village -  A Playbook for Integration Servers - Ryan Bonner, Guðmundur Karlsson
22:01
Science & Technologyresearch-presentationhybridwebmethods
DEF CON 33 Recon Village - Autonomous Video Hunter AI Agents for Real Time OSINT - Kevin Dela Rosa
23:21
Science & Technologyresearch-presentationtechnical-deep-diveai
Powered by Kuboid

We break your app
before they do.

Kuboid is a cybersecurity agency that finds hidden vulnerabilities before real attackers can exploit them. Proactive security testing, so you can ship with confidence.

Get in Touch

Trusted by the security community • Visit kuboid.in