Skip to main content

Python library for emulating USB devices

Reason this release was yanked:

replaced by 0.2019.31

Project description

# FaceDancer 2.2

This repository houses the next generation of FaceDancer software. Descended from
the original GoodFET-based FaceDancer, this repository provides a python module
that provides expanded FaceDancer support-- including support for multiple boards
and some pretty significant new features.

## What is a FaceDancer?

FaceDancer boards are simple hardware devices that act as "remote-controlled" USB
controllers. With the proper software, you can use these boards to quickly and
easily emulate USB devices-- and to fuzz USB host controllers!

This particular software repository currently allows you to easily create emulations
of USB devices in Python. Control is fine-grained enough that you can cause all
kinds of USB misbehaviors. :)

For more information, see:

* [Travis Goodspeed's blog post on FaceDancer](http://travisgoodspeed.blogspot.com/2012/07/emulating-usb-devices-with-python.html)
* [The FaceDancer 21, the original supported board](http://goodfet.sourceforge.net/hardware/facedancer21/)

## USBProxy 'Nouveau' and Protocol Analysis

A major new feature of the newer FaceDancer codebase is the ability to man-in-the
middle USB connections-- replacing one of the authors' original [USBProxy](https://github.com/dominicgs/usbproxy)
project. This opens up a whole new realm of applications-- including protocol analysis
and live manipulation of USB packets-- and is especially useful when you don't control
the software running on the target device (e.g. on embedded systems or games consoles).

```
+-----------------------------------------------------------------------+
+------------+ | +--------------------------------+ +---------------------------+ | +--------------+
| | | | | | | | | |
| PROXIED | | | HOST COMPUTER | | FACEDANCER DEVICE | | | TARGET USB |
| DEVICE <------> running FaceDancer software <---> acts as USB-Controlled <------> HOST |
| | | | | | USB Controller | | | |
| | | | | | | | | |
+------------+ | +--------------------------------+ +---------------------------+ | +--------------+
| |
| MITM Setup (HOST + FACEDANCER) |
+-----------------------------------------------------------------------+
```


This feature is complete, but could use more documentation. Pull requests are welcome. :)


## How do I use this repository?

First, you'll likely want to set the ```BACKEND``` environment variable, which lets
the software know which type of FaceDancer board you'd like to use. If this variable
isn't set, the software will try to guess for you based on what's connected. It doesn't
always make the best guesses, so you're probably better off setting it yourself.

Next, you can run any of the pre-made scripts, e.g. ```facedancer-serial.py```.

For example:

```sh
export BACKEND=goodfet
./facedancer-serial.py
```

## What boards are currently supported?

* All GoodFET-based facedancers, including the common FaceDancer21 (```BACKEND=goodfet```)
* The [GreatFET One](http://greatscottgadgets.com/greatfet/) (```BACKEND=greatfet```)
* The NXP LPC4330 Xplorer board (```BACKEND=greatfet```)
* The CCCamp 2015 rad1o badge with GreatFET l0adable (```BACKEND=greatfet```)
* RPi + Max3241 Raspdancer boards (```BACKEND=raspdancer```)

Note that hardware restrictions prevent the MAX3420/MAX3421 boards from emulating
more complex devices-- there's limitation on the number/type of endpoints that can be
set up. The LPC4330 boards-- such as the GreatFET-- don't suffer these limitations.

For a similar reason, the MAX3420/MAX3421 boards (`BACKEND=goodfet` or `BACKEND=raspdancer`)
currently cannot be used as USBProxy-nv MITM devices. All modern boards (`BACKEND=greatfet`)
should be fully functional.

## What boards could be supported soon?

* Any Linux computer with gadgetfs support (e.g. the Pi Zero or Beaglebone Black)

## What features do you plan on adding?

The roadmap is hazy, but in addition to multi-board support, this repository
eventually will be home to some cool new features, such as:

* High-speed ("USB 2.0") device emulation on devices with USB 2.0 PHYS

## Whose fault _is_ this?

There are a lot of people to blame for the awesomeness that is this repo,
including:

* Travis Goodspeed (@travisgoodspeed)
* Sergey Bratus (@sergeybratus)
* ktemkin (@ktemkin)
* Dominic Spill (@dominicgs)
* Michael Ossmann (@michaelossmann)
* anyone whose name appears in the git history :)

## Contributions?

... are always welcome. Shoot us a PR!


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Facedancer-2019.3.1.tar.gz (37.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

facedancer-2019.3.1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

Facedancer-2019.3.1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file Facedancer-2019.3.1.tar.gz.

File metadata

  • Download URL: Facedancer-2019.3.1.tar.gz
  • Upload date:
  • Size: 37.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for Facedancer-2019.3.1.tar.gz
Algorithm Hash digest
SHA256 6113d6a80b3d4b3fe7438cbc69041a69322b1ed93af8e0376a637cb418425353
MD5 57e6f7a90dd3713d6c7bdb0863de447a
BLAKE2b-256 4da0620bb58f886e226154fb5d5fa73efd330679e1d0f1f71a9c3f3bf0d5985c

See more details on using hashes here.

File details

Details for the file facedancer-2019.3.1-py3-none-any.whl.

File metadata

  • Download URL: facedancer-2019.3.1-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for facedancer-2019.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6253001018774101ab5a4dfaa1489d1859fa1565255f202d359b3f90f23eb414
MD5 10dfd7a4713d7f9605a221634b34d380
BLAKE2b-256 0a216a58c4845ae8b2bb59f67afd07ab3a7f4afb7bb3c54312c58960e9416b59

See more details on using hashes here.

File details

Details for the file Facedancer-2019.3.1-py3-none-any.whl.

File metadata

  • Download URL: Facedancer-2019.3.1-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for Facedancer-2019.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54dbdbeb87115abfcb573fca497a3fed46cad4e7645c80007c40f5288e65daf9
MD5 807907a5e506e22f5913ee22083f8703
BLAKE2b-256 8807135f5a92c0fe3528e4ab65b5840182ce4bd43747cc5ac437bcdd1dab66ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page