Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

PCILeech-DMA-Firmware

> DevOps
Open source

The last Pcileech DMA CFW guide you will ever need. Sponsored by DMAPolice.com

609 stars0 likes1 views
WebsiteGitHub

About

The last Pcileech DMA CFW guide you will ever need. Sponsored by DMAPolice.com

Custom Firmware Development Guide for PCIe Endpoint Modeling


Shout out to the legend that donated, I will be in contact soon. I'm gonna put your name here if you want just DM me.

Trying to organize this into a wiki but honestly I can barely organize my own life right now so the wiki's coming along like everything else -- slowly and in between crisis moments. Help is welcome.


** DMA Threat Landscape 2024-2026:**

Simple VID/DID spoofing on stock PCILeech firmware is no longer sufficient. Detection has evolved significantly. Swapping two hex values in Verilog and hoping for the best is not a strategy.

Fact tier -- confirmed: The pre-boot DMA CVEs are real: CVE-2025-11901 (ASUS), CVE-2025-14302 (Gigabyte), CVE-2025-14303 (MSI), CVE-2025-14304 (ASRock), tracked as VU#382314 by CERT/CC. Affected UEFI firmware misreported IOMMU as active while hardware was NOT initialized during early boot. Riot's security team discovered this. Vanguard reportedly blocks game launch on unpatched boards (VAN:Restriction).

Fact tier -- observed/inferred: IOMMU is required for FACEIT (confirmed 2025) and EAC competitive Fortnite (since Feb 2026). For Vanguard, Riot's June 2026 docs state IOMMU is required only for the optional Pre-Check/on-demand mode, not for the mandatory traditional driver. Community reports indicate anti-cheat kernels inspect PCIe config space for known signatures; specific offsets and signature content are not publicly documented. Honeypot memory regions are technically possible as a detection strategy but the observation mechanism varies by platform.

Fact tier -- speculative/unconfirmed: In May 2026 Riot claimed Vanguard can interfere with unauthorized DMA hardware. The mechanism is not publicly documented; host-side software cannot generically reconfigure arbitrary FPGA endpoints without an endpoint-specific control surface. Treat as unverified.

Build and test on DEDICATED ISOLATED HARDWARE. See §19.


A Note from the Author:

This is probably the last major version. I might do a stripped-down one for people who already understand hardware -- if you know what an FTDI chip does, I don't need to explain UART to you. This information needed to exist and nobody else was going to write it, so here it is. If it helped you and you're in a position to help back, that would mean something. If not, I get it.

This guide exists because real firmware development knowledge was scattered across forum threads, Discord servers that disappeared, pastebins that 404'd overnight, and gatekeepers who treated basic Verilog like state secrets. I've tried to put all of this together in one place -- the PCIe architecture, the Vivado workflow, the config space model, the TLP handling, the detection landscape, the shadow config technique, the whole thing from silicon to software. Knowledge doesn't expire. Understanding how the silicon works doesn't get patched out in an update.


In Memoriam

This guide is dedicated to Ross Freeman (1947-1989). Co-founder of Xilinx. Father of the FPGA. Dead at 44. This man invented a category of computing hardware that now runs AI accelerators, high-frequency trading systems, military radar, 5G infrastructure, and the Artix-7 chip in your FPGA card. All of it traces back to Ross Freeman in 1984 asking "what if the hardware could be reconfigured after manufacturing?" while the entire semiconductor industry told him he was crazy. At the time the whole race was toward smaller, faster, fixed-function ASICs, and this guy said: what if it could CHANGE? What if you could REWIRE it? They laughed at him. He was right. He got patent #4,870,302 and then died at 44 before he saw any of it. Posthumous National Inventors Hall of Fame induction in 2009. Ross Freeman gave the world programmable silicon.

"The ultimate goal of the FPGA was to make programmable logic devices that could replace standard digital chips." -- Ross Freeman


Also for Terrence Andrew Davis (1969-2018). TempleOS. Wrote his own kernel, his own compiler, his own editor, his own graphics stack, his own programming language called HolyC -- one man, 100,000+ lines of code, while battling severe mental illness that made his hands shake so badly he could barely type.

Terry understood something the entire software industry forgot: COMPLEXITY IS A COPE. It's what mediocre people do to make you think they're smart -- they build things so complicated and abstract and overengineered that you can't understand them, so you assume genius. Academic journals do this. Xilinx does this. Vivado is FIFTY GIGABYTES of software for an IDE that programs an FPGA chip. FIFTY. Terry's ENTIRE operating system -- kernel, compiler, editor, games, graphics, networking stack -- was measured in MEGABYTES. He compiled his whole OS faster than Vivado can synthesize a basic PCIe core on a 16-core workstation. His computer from 2005 built an operating system in less time than your Ryzen 9 takes to generate a bitstream for a 35T Artix-7. You tell me who the madman is.

Terry passed away in August 2018 at age 48. He was homeless, living in a van. Fans brought him food and supplies, but he refused housing because Terry didn't want your house -- he wanted you to understand TempleOS. And nobody did. Not while he was alive. That's the pattern -- Ross Freeman gets the plaque after he's dead, Terry Davis gets the "actually he was a genius" articles after he's dead, and the living people building things right now are struggling and nobody notices until you're gone. I'm not Ross Freeman and I'm not Terry Davis, but I understand them. I understand building something while everything collapses. I understand doing the work anyway.

"An idiot admires complexity, a genius admires simplicity." -- Terry A. Davis

"What people are going to read is, 'It's about a pathetic schizophrenic who made a crappy operating system.' My perspective is, 'God said I made His temple.'" -- Terry A. Davis

RIP King Terry. They never figured it out.


Before you begin. You're about to spend 40-60 hours breathing SystemVerilog, fighting Vivado's 50 GB install, and potentially bricking your FPGA at least once. If you think you're going to copy-paste hex values from a repo and be done by Tuesday -- this isn't that guide. Ross Freeman invented the FPGA in 1984. He's been dead nearly 40 years. You're standing on a dead genius's shoulders. The minimum respect is learning how the silicon actually works.


Table of Contents

Part 1: The Silicon Doesn't Care About Your Feelings

  1. Introduction
  2. Key Definitions
  3. Device Compatibility
  4. Requirements
  5. Gathering Donor Device Information
  6. Initial Firmware Customization
  7. Vivado Project Setup and Customization

Part 2: Your Device's Passport, and Why a Forged One Is Not a Personality

  1. Advanced Firmware Customization
    • 8.1 Configuring PCIe Parameters
    • 8.2 BARs: The Host Rents You an Address, Not a Warehouse
    • 8.3 Interrupts: Make Noise Like Real Hardware or Don't Pretend You're Alive
  2. Emulating Device-Specific Capabilities
  3. Completions: Where Bad Tags Go to Die

Part 3: Prove It Works Before You Call It Firmware

  1. Building, Flashing, and Testing
  2. The ILA: Vivado's Tiny Black Box Recorder
  3. Troubleshooting: When the Host Calls Your Device an Unknown Piece of Garbage
  4. Timing, CDC, and Other Ways to Lose Your Weekend
  5. Best Practices for Firmware Development
  6. Additional Resources
  7. Contact Information
  8. Support and Contributions
  9. DMA Advances & State of the Art (2024-2026)

Part 1: The Silicon Doesn't Care About Your Feelings


1. Introduction

1.1 Purpose of the Guide

The overarching goal of this guide is to empower you with the knowledge and practical skills to develop custom Direct Memory Access (DMA) firmware for Field-Programmable Gate Array (FPGA)-based devices. This specialized firmware allows your FPGA to accurately emulate the identity and behavior of other PCIe (Peripheral Component Interconnect Express) hardware devices. Such emulation is a powerful technique with profound implications across several advanced domains:

Hardware Security Research:

  • Vulnerability Discovery: By emulating a device, you can create a controlled environment to send malformed or unexpected data to host drivers, systematically fuzzing for vulnerabilities (e.g., buffer overflows, race conditions) that might be exploitable from a hardware peripheral.
  • Driver Analysis: Observe how operating systems and specific drivers interact with hardware. You can emulate devices with non-standard configurations or undocumented features to understand driver behavior, identify security assumptions, or reverse-engineer proprietary protocols.
  • Side-Channel Analysis: While more complex, an emulated device could potentially be programmed to assist in experiments related to information leakage through timing or power analysis, by precisely controlling peripheral operations.

Red Teaming & Penetration Testing:

  • Bypassing Security Measures: Emulate a seemingly benign or whitelisted hardware device (e.g., a common NIC or storage controller) to gain DMA privileges. Once achieved, this allows direct interaction with system memory, potentially bypassing endpoint detection and response (EDR) systems or anti-malware solutions that operate at higher software layers.
  • Stealthy Persistence: An emulated malicious device could offer a covert way to maintain access to a compromised system, as it might be harder to detect than software-based implants.
  • Exploiting Trust Relationships: Systems often have implicit trust in connected hardware. Custom firmware can exploit this by mimicking devices that are granted specific permissions or access.

System Debugging & Diagnostics:

  • Reproducible Testbeds: Create highly specific hardware scenarios to reliably reproduce elusive bugs that may only occur with particular device states or data patterns.
  • Fault Injection: Intentionally emulate faulty device behavior (e.g., incorrect TLP formation, delayed responses) to test the robustness and error handling capabilities of the host system and its drivers.

Hardware Testing & Validation:

  • Driver Development: Test new or modified drivers against an emulated hardware profile before physical prototypes are available, or to simulate a wider range of hardware variants than physically accessible.
  • Compliance Testing: While not a substitute for official compliance tests, an emulated device can help pre-verify certain aspects of PCIe protocol adherence.

Legacy System Support & Interoperability:

  • Emulate older, discontinued, or hard-to-source PCIe devices to keep legacy systems operational or to bridge compatibility gaps between different hardware generations.

By progressing through this guide, you will gain proficiency in:

  • Meticulously extracting identifying attributes and configuration

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Carborchinesedmadmafw

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理