Choose the execution model
Firefox plugin
Installed when a target browser starts. Choose this model for Firefox
WebExtension APIs, navigation lifecycle events, or behavior that must remain
active throughout the session.
Client module
Executed by an authorized operator on a selected active session. Choose this
model for a bounded HTML/JavaScript interaction that has a clear completion
and cleanup path.
Dashboard library or repository contribution
- Create in the dashboard
- Contribute to the repository
Create a Firefox plugin
Open Browser Extensions, select New Plugin, enter its name and
description, then choose Create & Edit. Add or upload
manifest.json and every referenced source file in the plugin editor,
then save. Use Import instead when a reviewed P-BitM plugin ZIP is
already available.Create a client module
Open Modules and select New Module. Define its metadata,
category, optional icon and link, inputs, and HTML/JavaScript payload,
then save. Existing modules can also be opened, cloned, edited, exported,
or deleted from the same page.
Assign it to a campaign
Select the reviewed plugin or module in the campaign wizard. Plugins are
installed when target browsers start; assigned modules become
available to the operator for execution on an active session.
Dashboard-created records belong to that P-BitM deployment and are stored
in its application database. Export them for review or backup. A plugin
ZIP can be imported into another deployment; a module JSON export is a
source definition and must be re-created or installed as a seed before
the initial module-library population.
- Firefox plugin
- Client module
Create it in the dashboard
The Browser Extensions page supports two creation paths:- New Plugin creates an empty library record and opens the file editor,
where you can create or upload
manifest.json, scripts, and text assets; - Import accepts a reviewed ZIP using the P-BitM archive layout described below.
.js, .json, and .md. Create other
UTF-8 text paths directly in the editor, or include them in a reviewed import
ZIP; binary plugin files are not supported.The editor saves the plugin name, description, and complete validated file set.
Export produces the same portable ZIP layout used by import.Runtime lifecycle
A plugin selected in the campaign wizard is copied into campaign-owned storage. When P-BitM creates a target browser, it packages the validated files as an XPI, replaces the supportedVICTIM_ID placeholder in .js and
.html files, and installs the XPI through Firefox enterprise policy.Use campaign-local routes for any approved communication. Do not send collected
content to hard-coded public hosts or introduce a second, unaudited data path.Extension source
A usable plugin normally contains a WebExtension manifest and every script or asset referenced by it:manifest.json
Library ZIP
Plugins imported through the dashboard use a wrapper archive.plugin.json
contains P-BitM library metadata; files below files/ become the extension
source and the runtime XPI.plugin.json
. or .. segments,
duplicates, symlinks, encrypted ZIP members, and non-text content. The current
limits are 128 files, 2 MiB per file, and 10 MiB total uncompressed content.The archive wrapper is not part of the installed extension. Firefox receives
the contents of
files/, packaged by P-BitM as an XPI.Library plugin or built-in extension
- Add a library plugin when operators should explicitly import, review, and assign the behavior to selected campaigns.
- Change a built-in extension only when the behavior is a platform default
that every browser runtime requires. Built-ins live below
bitm-images/common/firefox/bad_firefox_extensions/and must remain aligned with the extension list inserver/backend/routes/campaign_lifecycle.pyand both VNC and Selkies startup scripts.
Repository contribution workflow
Define the assessment contract
Describe the authorized use case, execution trigger, required permissions,
expected visible behavior, data produced, retention needs, and cleanup
conditions. Explain why an existing plugin or module cannot provide it.
Choose the smallest extension surface
Prefer an operator-triggered module for a short page interaction. Use a
Firefox plugin only when the behavior genuinely requires WebExtension APIs
or continuous browser lifecycle access.
Implement against the contract
Follow the manifest or JSON format above. Keep permissions, files, inputs,
output, and runtime duration as small as possible. Reuse campaign-local
transport and the provided cleanup mechanism.
Test both success and cleanup
Test only against synthetic pages and data. Verify the intended behavior,
malformed or missing inputs, repeated execution, navigation, session end,
and cleanup. Firefox changes must work in both VNC and Selkies runtimes.
Add regression coverage and documentation
Update tests for validation, packaging, runtime integration, or UI changes.
Document permissions, inputs, output, limitations, and operator-visible
behavior without including real assessment data.
Verification
- Firefox plugin
- Client module
- Frontend editor
Review standard
Before proposing the new attack vector, confirm:- the use case is limited to controlled, explicitly authorized assessments;
- Firefox permissions and URL matches are no broader than required;
- inputs are treated as untrusted and output is schema-valid and bounded;
- all communication stays on documented campaign-local paths;
- no secrets, identifiers, collected content, or personal data enter logs;
- repeated execution and cleanup are deterministic;
- VNC and Selkies compatibility is tested when browser behavior changes;
- validation, packaging, runtime, and UI changes have regression coverage;
- documentation states operator-visible behavior and limitations;
- third-party code and assets have compatible licenses and attribution.
Read the contribution policy
Review repository-wide testing, licensing, documentation, and pull-request requirements.
