This paper explores a novel "Living off the Land" (LotL) attack vector: leveraging the small, multimodal language models (LMs) now shipping natively within web browsers. By using Google Chrome’s Gemini Nano as a post-exploitation engine, the authors demonstrate how an attacker can perform complex, automated data triage and cyber operations entirely on-device, bypassing traditional network-based detection.
TL;DR
Attackers can repurpose browser-embedded LLMs like Gemini Nano as stealthy, vendor-signed post-exploitation agents that require no network egress for inference. By driving these models with simple OS-native scripts (PowerShell/Python), an intruder can automate complex tasks like reading passwords from webcam photos and triaging sensitive files without ever alerting network defenders.
What Problem Does This Paper Address?
Traditional "Living off the Land" (LotL) attacks involve using trusted, pre-installed tools (like PowerShell or WMI) to blend in with normal system activity. While Large Language Models (LLMs) could theoretically supercharge these attacks, their size usually forces malware to rely on remote APIs. This creates "choke points": defenders can monitor network traffic to known API endpoints or revoke the attacker's credentials.
The authors identify a new gap: browser-embedded models. Vendors like Google and Microsoft are now deploying 2–4 GB multimodal models (e.g., Gemini Nano, Phi) directly to user endpoints to power features like summarization. These models are "signed" by trusted vendors, run entirely offline, and are invisible to network monitoring, making them perfect candidates for a new era of stealthy, adaptive LotL tradecraft.
Methods
The researchers developed an agentic harness—a simple tool-calling loop written in Python or PowerShell—that interacts with Chrome’s Gemini Nano via the Prompt API.
Key technical hurdles addressed include:
- Gaining Access: They used the Chrome DevTools Protocol (CDP) to evaluate JavaScript in a browser page, allowing the script to call the model.
- Bypassing Gating: Chrome requires a "user gesture" (like a click) before downloading the model. The authors showed this is easily bypassed using synthetic OS-level clicks or by simply copying model files and the
Local Statefile from an existing profile. - Tool Execution: The harness uses JSON schemas to force the model to output structured "tool calls." These calls are then executed by the script to perform file operations, capture screenshots, or manipulate the GUI.
Datasets
The authors evaluated Gemini Nano’s post-exploitation capabilities using several established benchmarks:
- CredData: Used to measure the model's ability to identify credentials (secrets) in source code.
- Enron Corpus: Used to test detection of Personally Identifiable Information (PII) in emails.
- Imagenette: A subset of ImageNet used to evaluate the model's vision/classification accuracy.
- Berkeley Function-Calling Leaderboard (BFCL): Used to quantify the model's accuracy in selecting and formatting tool calls.
Key Insights and Ideas
- The Stealth Advantage: Because inference happens locally, there is zero network traffic. A security product monitoring for "AI-enabled malware" would see nothing on the wire.
- Crossing the Physical-Digital Divide: Multimodality is a game-changer. The authors demonstrated the model reading a password from a webcam photo of a sticky note to unlock a digital archive.
- The "Won't Fix" Reality: The authors disclosed their bypass techniques to Google, who marked them as "Won't Fix." This is because Chrome’s threat model assumes that if an attacker already has "user-level" access to the machine, the browser is already compromised. This creates a permanent "feature" for attackers to exploit.
- Planning vs. Execution: While Gemini Nano is a poor autonomous planner (often getting stuck in loops), it is a highly reliable executor of a human-provided plan.
Key Results
The model proved surprisingly competent for its size (Table 2):
- Data Triage: Achieved an F1 score of 0.91 for identifying secrets in code and 0.92 for detecting PII in emails.
- Vision: Reached 98% top-1 accuracy on image classification tasks.
- Tool Calling: Correctly formatted and called tools with 86% overall accuracy (Table 3).
In a simulated end-to-end operation (Figure 2), the agent successfully used a webcam photo to find a password, unlocked an encrypted 7z archive, triaged five files to find an SSH key, and staged it for exfiltration. With an explicit plan (Figure 3), it succeeded in 41 out of 50 trials.
Limitations and Future Work
- Context Window: The model is limited to roughly 9,216 tokens, requiring the harness to manage "memory" by appending results to disk rather than keeping everything in the prompt.
- Planning Errors: Without a structured checklist, the model often burns its "step budget" on redundant actions.
- Detection: While network-invisible, the authors suggest defenders look for process lineage (e.g., Chrome launched by a PowerShell script with debugging flags) and local listeners on loopback ports.
The authors conclude that as these models inevitably improve, the "free" capabilities provided to attackers will only grow, necessitating a shift in how organizations govern and monitor on-device AI.
Summary updated