ikelos / pcileech

Direct Memory Access (DMA) Attack Software
GNU General Public License v3.0
0 stars 0 forks source link

PCILeech Summary:

PCILeech uses PCIe hardware devices to read and write from the target system memory. This is achieved by using DMA over PCIe. No drivers are needed on the target system.

PCILeech supports multiple hardware. USB3380 based hardware is only able to read 4GB of memory natively, but is able to read all memory if a kernel module (KMD) is first inserted into the target system kernel. FPGA based hardware is able to read all memory.

PCILeech is capable of inserting a wide range of kernel implants into the targeted kernels - allowing for easy access to live ram and the file system via a "mounted drive". It is also possible to remove the logon password requirement, loading unsigned drivers, executing code and spawn system shells. PCIleech runs on Windows/Linux/Android. Supported target systems are currently the x64 versions of: UEFI, Linux, FreeBSD, macOS and Windows.

PCILeech also supports the Memory Process File System - which can be used with PCILeech FPGA hardware devices in read-write mode or with memory dump files in read-only mode.

To get going clone the repository and find the required binaries, modules and configuration files in the pcileech_files folder.

For use cases and more detailed information check out this readme and the project wiki pages.

Capabilities:

*) macOS High Sierra is not supported.

Hardware:

PCILeech supports multiple hardware devices. Please check out the PCILeech FPGA project for information about supported FPGA based hardware. Please check out PCILeech USB3380 for information about USB3380 based hardware. PCILeech also support memory dump files for limited functionality.

Please find a device comparision table below.

Device Type Interface Speed 64-bit memory access PCIe TLP access
AC701/FT601 FPGA USB3 150MB/s Yes Yes
PCIeScreamer FPGA USB3 100MB/s Yes Yes
SP605/FT601 FPGA USB3 75MB/s Yes Yes
SP605/TCP FPGA TCP/IP 100kB/s Yes Yes
USB3380-EVB USB3380 USB3 150MB/s No (via KMD only) No
PP3380 USB3380 USB3 150MB/s No (via KMD only) No

Recommended adapters:

Please note that other adapters may also work.

Installing PCILeech:

Please ensure you do have the most recent version of PCILeech by visiting the PCILeech github repository at: https://github.com/ufrisk/pcileech

Clone the PCILeech Github repository. The binaries are found in pcileech_files and should work on 64-bit Windows and Linux. Please copy all files from pcileech_files since some files contains additional modules and signatures.

Windows:

The Google Android USB driver also have to be installed if USB3380 hardware is used. Download the Google Android USB driver from: http://developer.android.com/sdk/win-usb.html#download Unzip the driver. Open Device Manager. Right click on the computer, choose add legacy hardware. Select install the hardware manually. Click Have Disk. Navigate to the Android Driver, select android_winusb.inf and install.

FTDI drivers have to be installed if FPGA is used with FT601 USB3 addon card. FTDI drivers will installed automatically on Windows from Windows Update at first connection. PCILeech also requires 64-bit FTD3XX.dll which must be downloaded from FTDI and placed alongside pcileech.exe.

To mount live ram and target file system as drive in Windows the Dokany file system library must be installed. Please download and install the latest version of Dokany at: https://github.com/dokan-dev/dokany/releases/latest

Linux:

PCILeech on Linux must be run as root. PCILeech also requires libusb. Libusb is probably installed by default - if not install it by running: apt-get install libusb-1.0-0.

Android:

Separate instructions for Android.

Examples:

Please see the project wiki pages for more examples. The wiki is in a buildup phase and information may still be missing.

Mount target system live RAM and file system, requires that a KMD is loaded. In this example 0x11abc000 is used.

Show help for a specific kernel implant, in this case lx64_filepull kernel implant.

Show help for the dump command.

Dump all memory from the target system given that a kernel module is loaded at address: 0x7fffe000.

Force dump memory below 4GB including accessible memory mapped devices using more stable USB2 approach.

Receive PCIe TLPs (Transaction Layer Packets) and print them on screen (correctly configured FPGA dev board required).

Probe/Enumerate the memory of the target system for readable memory pages and maximum memory. (FPGA hardware only).

Dump all memory between addresses min and max, don't stop on failed pages. Native access to 64-bit memory is only supported on FPGA hardware.

Force the usage of a specific device (instead of default auto detecting it). The sp605_tcp device is not auto detected.

Mount the PCILeech Memory Process File System from a Windows 10 64-bit memory image.

Generating Signatures:

PCILeech comes with built in signatures for Windows, Linux, FreeBSD and macOS. For Windows 10 it is also possible to use the pcileech_gensig.exe program to generate alternative signatures.

Limitations/Known Issues:

Building:

The binaries are found in the pcileech_files folder. If one wish to build an own version it is possible to do so. Compile the pcileech and pcileech_gensig projects from within Visual Studio. Tested with Visual Studio 2015.

To compile kernel- and shellcode, located in the pcileech_shellcode project, please look into the individual files for instructions. These files are usually compiled command line. To compile for Linux make sure the dependencies are met my running: apt-get install libusb-1.0-0-dev pkg-config then move into the pcileech/pcileech directory and build by running: make. Download the shellcode module and configuration files separately from the binary download link and put them alongside the pcileech executable.

Separate instructions for Android.

Links:

Changelog:

v1.0

v1.1-v1.5

v2.0-2.6

v3.0