Security researchers at Koi Security have uncovered a large-scale malicious campaign, dubbed GhostPoster, that abuses Firefox browser extensions. Attackers embedded harmful JavaScript code into the PNG logos of 17 Firefox add-ons using steganography, achieving more than 50,000 installations before the extensions were removed. The incident highlights how trusted browser extensions can be turned into stealthy malware delivery channels.
How the GhostPoster Firefox malware campaign operates
Steganography hides malicious JavaScript in PNG extension icons
The defining feature of GhostPoster is its use of steganography — a technique for hiding data inside seemingly harmless files. Instead of storing malicious code in the visible extension scripts, the operators embedded a JavaScript fragment directly in the raw byte structure of PNG logo images used by the extensions.
To users and standard automated checks, these icons appear normal. Inside the extension, however, a dedicated script sequentially reads the raw image bytes, extracts the hidden JavaScript, and executes it in the add-on’s context. This extracted code acts as a loader: it does not contain the main malicious functionality itself, but is responsible for retrieving additional payloads from a remote command-and-control (C2) server.
Delayed activation and low‑frequency C2 traffic for evasion
GhostPoster incorporates several layers of evasion designed to avoid network monitoring and extension behavior analysis. After installation, the loader remains inactive for roughly 48 hours. This delay makes it harder for defenders to correlate the installation of a particular extension with the onset of suspicious activity.
Even after the delay, the loader only contacts the C2 infrastructure for the main payload in approximately one out of ten execution attempts. During the remaining runs, the code stays dormant. This strategy significantly reduces malicious network traffic and complicates anomaly detection. The operators also provisioned a backup C2 server to maintain resilience if the primary domain is blocked or taken down.
Multi-layer obfuscation and XOR encryption of the payload
The payload delivered from the remote server is heavily obfuscated. According to researchers, the attackers combine multiple techniques, including character case manipulation, Base64 encoding, and structural code transformations.
After initial decoding, the data is additionally encrypted using a XOR routine. The key is generated dynamically at runtime based on the specific runtime ID of each extension instance. As a result, the same malicious component can appear differently across systems, significantly hindering static and dynamic analysis and reducing the effectiveness of traditional signature-based detection.
Security risks of malicious Firefox extensions
Once fully activated, the GhostPoster payload leverages the legitimate APIs and permissions available to Firefox extensions. Depending on the granted rights, such add-ons can read and modify web page content, inject additional JavaScript, monitor browsing activity, and alter or insert advertising elements.
In the variant analyzed by Koi Security, GhostPoster was not yet exfiltrating passwords or automatically redirecting users to phishing pages. However, the primary threat lies in the presence of a stealth loader that can, at any time, fetch more aggressive modules — for example, credential theft tools, spyware, or adware components.
This risk is amplified by the fact that GhostPoster extensions were masquerading as common categories such as VPN clients, translation tools, ad blockers, and weather widgets. Users often install such extensions to increase privacy or convenience, unknowingly creating a persistent surveillance and manipulation channel inside their browser.
Mozilla’s response and impact on the browser extension ecosystem
Mozilla representatives confirmed that the team responsible for the add-on ecosystem has investigated the incident and removed all identified malicious extensions from the official addons.mozilla.org catalog. Detection systems have been updated to flag extensions exhibiting similar technical and behavioral patterns.
The GhostPoster case underscores that code review and formal moderation alone cannot guarantee extension security. Techniques such as steganography, delayed execution, staged loaders, and layered obfuscation enable attackers to bypass both automated and manual checks, at least temporarily. Similar abuse of extension ecosystems has been documented in other major browsers over the years, showing this is a systemic industry challenge rather than a platform-specific issue.
Because browser add-ons typically have broad access to web content and can update silently, they remain a high-risk component in corporate and consumer environments. This is driving a gradual shift toward stricter permission models, sandboxing, and behavior-based monitoring for extensions across the industry.
How to protect Firefox from malicious add-ons like GhostPoster
The GhostPoster campaign reinforces the need for more disciplined management of browser extensions. To reduce risk, security specialists recommend the following measures for both individual users and organizations:
1. Install extensions only from the official Firefox add-ons site. Avoid third‑party repositories, bundled installers, and random ZIP or XPI archives, especially those promoted via ads or social networks.
2. Validate the developer and reputation. Prefer well-known vendors, review the publisher’s history, and read user feedback. Be wary of extensions with very few installations but unusually high ratings.
3. Minimize the number of installed add-ons. Treat each extension as installed software. Only keep those that are strictly necessary, and regularly review and remove anything unused.
4. Scrutinize requested permissions. If a simple tool asks for access to “all websites,” browsing history, or clipboard data without a clear purpose, consider it a red flag.
5. Keep Firefox and extensions updated. Timely updates deliver security fixes and improvements to extension vetting and browser protection mechanisms.
6. Use network and endpoint security controls in corporate environments. Web proxies, DNS filtering, and EDR solutions can help detect unusual C2 traffic, suspicious extension behavior, and data exfiltration attempts.
The discovery of GhostPoster demonstrates how sophisticated and low-profile modern extension-based attacks have become, combining steganography, delayed activation, and advanced obfuscation to evade detection. Treating browser extensions with the same caution as any other software — verifying their reputation, constraining permissions, and periodically auditing what is installed — is now essential for protecting both personal privacy and organizational data.