Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

pcileechfwgenerator

Latest version: v0.20.2

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: hurricaneking
327 Stars
82 Forks
7 Versions
1.2K Downloads
Python Repo language

Scan summary

pcileechfwgenerator was last scanned on 29 Nov 2026 at version 0.20.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 2 were published within 2 days (28 and 29 Nov 2026).
  • Findings: No rules fired in version 0.20.2.
  • Downloads: 1,210 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.20.2 LATEST 29 Nov 2026 No rules fired
0.20.1 28 Nov 2026 No rules fired
0.20.0 20 Nov 2026 No rules fired
0.19.4 3 Nov 2026 Not shown
0.19.3 3 Nov 2026 Not shown

No rules fired in 0.20.2

Findings

Findings for v0.20.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.20.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

PCILeech Firmware Generator

CI/CD Status

CI Security E2E Release

Quality Metrics

Python Version License Latest Release Downloads

Discord

Generate PCIe DMA firmware from real donor hardware. The tool reads a donor card's configuration over VFIO and builds a PCILeech FPGA bitstream from it.

[!WARNING] This tool requires real hardware. Templates are built from the identifiers of an actual donor card, and placeholder values are rejected. Using your own donor device keeps your firmware unique.

Build Pipeline

The generator runs three stages:

  1. Stage 1 (Host): Collects PCIe device data via VFIO. This includes config space, BARs, the capability chain, MSI-X tables, and register behavior learned by tracing the native driver with mmiotrace (skip with --no-mmio-learning).
  2. Stage 2 (Container or local): Renders SystemVerilog, TCL, and COE files from the collected data. The container has no VFIO access.
  3. Stage 3 (Host): Runs Vivado through build_all.tcl, the only Stage 3 entry. Routed timing, clock coverage, DRC, and CDC checks must pass before the bitstream is written. Stage 3 is optional (--templates-only stops after Stage 2).

See Host-Container Pipeline for details.

Key Features

  • Donor analysis: Real PCIe configuration and register maps from live hardware via VFIO.
  • Register learning: Native driver behavior captured with mmiotrace during Stage 1.
  • Config-space shadow: Full 4 KB shadow in BRAM with an explicit writemask policy.
  • MSI-X: Served from the donor's own BAR, including multi-BAR layouts. Overview and limits are in MSIX_STATUS.md.
  • Offline capture: Collect once, then render later without the donor (see below).
  • Interactive TUI: Textual-based interface for device selection and builds.
  • Flashing: USB flashing of a .bin image through usbloader.

Quick Start

Installation (Ubuntu 22.04+ / Debian 12+)

Modern Linux requires a virtual environment:

# Create and activate virtual environment
python3 -m venv ~/.pcileech-venv
source ~/.pcileech-venv/bin/activate

# Install with TUI support
pip install pcileechfwgenerator[tui]

# Verify installation
pcileech version
Running with Root Access (Required for VFIO)

VFIO requires root. Use the venv's Python directly with sudo:

# Add this alias to ~/.bashrc for convenience:
echo "alias pcileech-sudo='sudo ~/.pcileech-venv/bin/python3 -m pcileechfwgenerator.pcileech_main'" >> ~/.bashrc
source ~/.bashrc

# Load VFIO modules
sudo modprobe vfio vfio-pci

# Now run commands with pcileech-sudo:
pcileech-sudo tui                                                    # Interactive TUI
pcileech-sudo build --bdf 0000:03:00.0 --board pcileech_35t325_x1   # CLI build
pcileech-sudo check --device 0000:03:00.0                            # VFIO diagnostics

For complete setup including IOMMU configuration, see the Installation Guide.

Requirements
  • Python 3.11 or newer
  • Linux with VFIO support (Stage 1)
  • A donor PCIe card (any inexpensive NIC, sound, or capture card)

Optional:

  • Podman, for isolated Stage 2 templating
  • A PCILeech DMA board (for example pcileech_75t484_x1, pcileech_35t325_x4, or pcileech_100t484_x1)
  • Vivado 2022.2 or newer for Stage 3
CLI Commands
# Interactive TUI (recommended for first-time users)
pcileech-sudo tui

# Full 3-stage build
pcileech-sudo build --bdf 0000:03:00.0 --board pcileech_35t325_x1

# Stage 1 only (collect device data, then exit)
pcileech-sudo build --bdf 0000:03:00.0 --board pcileech_35t325_x1 --host-collect-only

# Run Stage 2 locally (skip the container)
pcileech-sudo build --bdf 0000:03:00.0 --board pcileech_35t325_x1 --local

# Full build with an explicit Vivado install
pcileech-sudo build --bdf 0000:03:00.0 --board pcileech_35t325_x1 \
    --vivado-path /tools/Xilinx/2025.1/Vivado --vivado-jobs 8 --vivado-timeout 7200

# Opt-in build flags (see `pcileech build --help`)
#   --writable-bar-fallback  emulate writable RAM for a served BAR with no learned register model
#                            (default is read-only; this is not donor behavior)
#   --ft601-legacy-phy       legacy FT601 PHY instead of the MMCM one (CaptainDMA 100T only)
#   --no-mmio-learning       skip the mmiotrace driver capture in Stage 1
#   --force-recapture        redo MMIO capture even if cached models exist

# Check VFIO configuration
pcileech-sudo check --device 0000:03:00.0

# Flash a firmware image (.bin, written through usbloader)
pcileech-sudo flash firmware.bin --board pcileech_35t325_x1

# Show version information (no sudo needed)
pcileech version
Offline Captures

Saved donor captures need matching, versioned device-context and MSI-X files. Older or incomplete captures must be collected again into a fresh --datastore, because collection never overwrites an existing capture. Reuse checks the requested PCI address and the current device identity. See the capture format and migration guide.

The CLI provides capture collect, capture validate, capture import, and build --from-capture DIR --templates-only. Complete captures include measured BAR lengths and can be rebuilt without the donor, on the machine that collected them. See the offline workflow and its limits.

[!WARNING] Builds from a saved capture are unverified. The donor is not read during the build, so nothing confirms the capture still describes hardware you have. Every such build prints a large warning, asks you to accept the risk (or requires --accept-offline-risk when not run at a terminal), and writes OFFLINE_BUILD_WARNING.txt next to its artifacts. Captures are locked to the machine that collected them and are marked with CAPTURE_WARNING.txt; do not share them. Use the firmware only with hardware you own, against systems you own or are explicitly authorised to test.

[!IMPORTANT] Use the venv. Running pip install pcileechfwgenerator into the system Python fails with externally-managed-environment on modern distros.

Version Updates

CLI builds check for newer versions. Set PCILEECH_DISABLE_UPDATE_CHECK=1 to disable the check, or run pcileech version to see the current version.

Development from Repository
# Clone with the board submodule
git clone --recurse-submodules https://github.com/voltcyclone/PCILeechFWGenerator.git
cd PCILeechFWGenerator

python3 -m venv .venv && source .venv/bin/activate
pip install -e .

# From a checkout, run the root script
sudo -E python3 pcileech.py tui
  • If you cloned without --recurse-submodules, run git submodule update --init --recursive. The lib/voltcyclone-fpga submodule holds the board definitions and synthesis sources.
  • The container clones voltcyclone-fpga during the image build and needs no submodule.
  • pip installs bundle the board files (installed under pcileechfwgenerator/voltcyclone_fpga), so they need no checkout. Only a source checkout needs --recurse-submodules.

Troubleshooting

See the Troubleshooting Guide for VFIO setup, installation problems, BAR detection, and locked IP cores.

Common Issues
"externally-managed-environment" Error

Use a virtual environment:

python3 -m venv ~/.pcileech-venv
source ~/.pcileech-venv/bin/activate
pip install pcileechfwgenerator[tui]
"ModuleNotFoundError: No module named 'textual'"

Install with TUI support:

pip install pcileechfwgenerator[tui]
TUI build settings and older profiles

The TUI uses the shared CLI pipeline in the active Python environment. Select a real board and choose local or container templating. Both modes collect and run Vivado on the Linux host. Unsupported legacy profile settings fail before collection. See the TUI build contract and migration guide.

"Permission denied" / VFIO Errors

Use the venv's Python with sudo:

sudo ~/.pcileech-venv/bin/python3 -m pcileechfwgenerator.pcileech_main tui
Quick Diagnostic
pcileech-sudo check --device 0000:03:00.0 --interactive

Documentation Links

The docs are managed in the site repo and served by Cloudflare.

Output Files

Artifacts go to the datastore (default pcileech_datastore/):

pcileech_datastore/
├── device_context.json       # Stage 1: collected device data
├── msix_data.json            # Stage 1: MSI-X capability data
└── output/                   # Stage 2 and 3 artifacts, including a per-board directory
    ├── pcileech_top.sv       # Top-level SystemVerilog module
    ├── device_config.sv      # Device configuration module
    ├── build_all.tcl         # Stage 3 entry script
    └── *.bit                 # Bitstream (only after Stage 3)

Board vivado_*.tcl project scripts are not staged. build_all.tcl is the only Stage 3 entry.

Cleanup and Safety

  • Rebind donors to their original drivers through the TUI or CLI after collection.
  • Keep generated firmware private. It contains real device identifiers.
  • Build in an isolated environment, never on a production system.

Acknowledgments

  • PCILeech Community: For feedback and contributions
  • @Simonrak for the writemask implementation

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Legal Notice

[!IMPORTANT] This tool is intended for educational research and legitimate PCIe development only. Users are responsible for complying with all applicable laws. The authors assume no liability for misuse of this software.

  • Use dedicated, separate hardware for builds.
  • Follow responsible disclosure for any security research, and see SECURITY.md to report a vulnerability.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases pcileechfwgenerator

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229