Featured

Configure LPC4430 with GreatFet and Facedancer

Introduction

The following are some of my notes for getting the hardware and software ready in preparation for security testing a USB host and device.

The goal was to run the latest Facedancer 2.0 test scripts and create my own for automated testing and reverse engineering usb devices.

Hopefully, if you have found yourself in a similar situation of needing to test USB and are having trouble figuring out which hardware will work with which firmware and software, then this might help.

Background

At the time of writing, the main projects for testing usb are Facedancer21, GreatFET, Facedancer 2.2, umap, and umap2.

Currently umap(2) frameworks do not support Facedancer 2.2.

Setup

Hardware

NXP LPC4330 Xplorer

My goal was to begin testing with Facedancer 2.2 test scripts. If you read the Facedancer 2.2 pages, you’ll see that the LPC4330 based boards will give you the best support.

I obtained an NXP LPC4330 XPLORER board from ebay for $59.

A word of warning. I noticed that the board I received

lpc4330had it’s J4 switches in a different orientation to that of the images on the NXP website

Test computer

I first attempted flashing firmware on my board using my Macbook with Kali Linux vm guest. This didn’t go down well.

I ended up using my wife’s Dell laptop running Linux Mint.

Software

Firmware

Proceeded to clone GreatFET firmware.

Two important steps here, you will need to install the GreatFET python utilities (greatfet_info, …), and then compile the GreatFET firmware for flashing onto the LPC4330 board.

Note: I had trouble compiling firmware with packaged version of gcc-arm-none-eabi on Linux Mint. I ended up directly downloading gcc-arm-none-eabi from https://developer.arm.com/open-source/gnu-toolchain/gnu-rm.

Test scripts

Clone the test scripts at https://github.com/ktemkin/Facedancer.

Connect your test system with Facedancer code to LPC4330 usb0 port, and usb1 to your target system’s usb port.

References

https://github.com/greatscottgadgets/greatfet

https://github.com/ktemkin/Facedancer

http://goodfet.sourceforge.net/hardware/facedancer21/

http://travisgoodspeed.blogspot.com/2012/07/emulating-usb-devices-with-python.html

https://github.com/nccgroup/umap

https://github.com/nccgroup/umap2

http://dfu-util.sourceforge.net/