Getting Started

Installation

Prerequisites and installation steps for PayloadFactory.

Installation

Prerequisites

  • Python >= 3.11
  • MinGW-w64 cross-compiler for Windows targets:
    • x86_64-w64-mingw32-g++ (default)
    • x86_64-w64-mingw32-clang++ (only if you use --clang / OLLVM — requires Obfuscator-LLVM)
  • g++ and/or clang++ for Linux targets
  • objdump (binutils) — used to extract shellcode from object files (.o / .obj)
  • donut binary — used to convert a Windows PE into shellcode (shipped under binary/)

On Debian/Ubuntu-based systems:

sudo apt install g++-multilib mingw-w64 binutils

Note: OLLVM obfuscation (--clang) requires a Clang build with the Obfuscator-LLVM pass plugin. The standard distro clang++ does not include these passes; install a prebuilt Obfuscator-LLVM toolchain and place x86_64-w64-mingw32-clang++ on your PATH.

Install PayloadFactory

git clone https://github.com/x42en/payloadfactory.git
cd payloadfactory
poetry install

Poetry reads the dependency set declared in pyproject.toml: colorama (colorized CLI output), pefile (PE/DLL parsing for DLL proxying), and sysplant (Windows syscall generation).

With pip

pip install .

Verify the install

python main.py -h

If g++, the MinGW cross-compiler, or objdump are missing from your PATH, the compile() step will raise a SystemError when PayloadFactory shells out to them.

Copyright © 2026