Community

Contributing

How to contribute to PayloadFactory.

Contributing

PayloadFactory is developed by Ben Mz (x42en). Contributions — bug reports, new injection techniques, and template fixes — are welcome.

Running the test suite

The project is managed with Poetry and tested with pytest (see [tool.pytest.ini_options] in pyproject.toml):

poetry install
poetry run pytest

Tests live in tests/ and cover the template manager, constants, factory pipeline, injection routing, and end-to-end generation (including multi-OS).

Adding an injection technique

An injection technique is primarily a template plus a constants entry:

  1. Add a stub under payloadfactory/templates/windows/{kernel,userland}/ (or linux/{kernel,userland}/) following the existing //#### PATTERN #### convention.
  2. Add the technique name to the appropriate list in payloadfactory/constants/payload_constants.py (SUPPORTED_INJECTIONS, REMOTE_INJECTIONS, or USERLAND_INJECTIONS; LINUX_* for Linux).
  3. Register a subparser for the technique in main.py.

Note: the codebase currently contains both snake_case and legacy camelCase module files. main.py imports the snake_case modules (e.g. payload_factory, executable_factory, template_manager) — treat those as the source of truth.

Reporting issues

Please file issues on the GitHub repository with the full CLI invocation, target OS/arch, and the exact error message. PayloadFactory shells out to external compilers and the donut binary, so include your toolchain versions when reporting build failures.

Copyright © 2026