# Falcon C2 Framework Compromises Browsers via Malicious JavaScript

> Discover how the Falcon C2 framework compromises web browsers using malicious JavaScript to target government entities and steal sensitive data.

- Published: 2026-12-05T05:12:46.000Z
- Severity: medium
- Category: Threat Intel
- Tags: Falcon C2, Malware, JavaScript, Browser Compromise, Threat Intel
- Author: Runtime Rebel Intel
- Primary source: https://unit42.paloaltonetworks.com/falcon-c2-browser-compromise/
- Canonical: https://runtimerebel.com/blog/falcon-c2-framework-compromises-browsers-via-malicious-javascript

## Key points

- Government ministries and law enforcement agencies across the Middle East and Southeast Asia were targeted by browser-based command and control campaigns.
- The Falcon C2 framework compromises victims' browsers by injecting malicious JavaScript into webmail portals and government web applications.
- Organizations must monitor for unauthorized browser extension sideloading, inspect web application integrity, and restrict unauthorized outbound WebSocket connections.

## Overview of Falcon [C2](/glossary#c2) Browser Compromise

Security researchers have identified **Falcon** (also known as *XG* or *Xiàng Gē*), an advanced command and control (C2) framework that targets victims by executing malicious JavaScript directly within web browsers. According to [Unit 42](https://unit42.paloaltonetworks.com/falcon-c2-browser-compromise/), threat actors compromised visitors to government web applications and webmail portals by embedding malicious scripts directly into legitimate sites. The campaigns primarily targeted ministries of foreign affairs, defense, interior, and law enforcement agencies across one Middle Eastern country and four Southeast Asian countries between March and May 2026.

Operating entirely inside the browser context, the framework sideloads malicious browser extensions and delivers secondary payloads such as the *Antino* implant, which utilizes Microsoft OneDrive as an alternative C2 channel. These targeted intrusion activities align closely with strategic intelligence collection objectives.

## Technical Analysis and TTPs

Falcon features sophisticated operational security (OPSEC) mechanisms designed to evade automated analysis and casual inspection. Management panels remain hidden, presenting a blank page that ignores standard right-click interactions via a global `contextmedia` listener. The actual login interface stays concealed until an operator presses the `F9` key three consecutive times.

Written in Node.js, the framework operates two distinct listeners:
- **Port 8080:** Dedicated to the management panel interface.
- **Port 443:** Dedicated to victim-facing operations.

To blend in with normal traffic, the victim-facing listener serves interactive browser games such as Tetris or Snake as default landing pages.

### [Payload](/glossary#payload) Delivery and [Obfuscation](/glossary#obfuscation)

When a target visits an infected website, the server generates a dynamically obfuscated implant utilizing two primary files: `victim_common.js` and `victim.js`. These scripts are combined and passed through an obfuscation routine that XOR-encodes each character with a single-byte key, transforming the output into an array of integers that decode and execute themselves at runtime.

Once active, the implant establishes a persistent [TLS](/glossary#transport-layer-security-tls)-encrypted WebSocket connection, utilizing the native browser Web Crypto [API](/glossary#api) for AES data [encryption](/glossary#encryption). It maintains [persistence](/glossary#persistence) via a 32-character session identifier stored across multiple browser storage mechanisms to survive session restarts.

### Relationship to PeckBirdy

Technical analysis reveals near-identical URL structures, communication protocols, and payload delivery mechanisms between Falcon and a scripting framework dubbed *PeckBirdy*, which was previously documented by Trend Micro in January 2026. Both frameworks store persistent session identifiers using identical Baidu-mimicking naming conventions, leading analysts to assess that Falcon and PeckBirdy represent variants of the same core toolset.

## Actionable Recommendations and Mitigations

Defenders seeking to detect and prevent Falcon C2 deployments should implement the following security measures:

- **Monitor Browser Extensions:** Audit enterprise browser environments to detect unauthorized or sideloaded extensions associated with campaign activity.
- **Network Telemetry Inspection:** Inspect inbound and outbound WebSocket traffic on port 443 for anomalous heartbeat patterns and recurring connections to unverified external infrastructure.
- **Web Application Integrity:** Implement strict [Content Security Policy (CSP)](/glossary#content-security-policy-csp) headers and file integrity monitoring on public-facing web applications to prevent unauthorized script injection.

**Related:** [Defending Against Blockchain-Based C2 and Dead Drops](/blog/defending-against-blockchain-based-c2-and-dead-drops), [Sophisticated Malicious npm Packages Evade Detection](/blog/sophisticated-malicious-npm-packages-evade-detection)

---

AI-generated analysis from the primary source above; not human-reviewed before publication — verify anything operational against the original (https://runtimerebel.com/editorial). Quote with attribution and a link to the canonical URL: https://runtimerebel.com/blog/falcon-c2-framework-compromises-browsers-via-malicious-javascript
