GoodFET on OS X Installation

WARNING: This worked for me. I make no promises it’ll work for you. I basically have no idea what I’m doing.

So, long story short, I’m very new to hardware and hardware hacking. Like, happy-when-I-don’t-burn-myself-soldering new. I recently took Joe Grand’s Hardware hacking Training (http://www.grandideastudio.com/portfolio/hardware-hacking-training/) at HushCon15 and fell in love.

I, somehow, convinced work to buy me a bunch of toys. Included in that set of toys was a GoodFET board (http://goodfet.sourceforge.net/, https://github.com/travisgoodspeed/goodfet). As with most things in infosec, there wasn’t much hand holding in terms of installation and getting things going (due in part to the fact that GoodFET is basically dead with development of GreatFET (https://github.com/greatscottgadgets/greatfet)).

I installed on OS X 10.10.5. While basic instructions were provided in several places, they were basic and each differed slightly from the other. After a little trial and error, this is what I ended up with.

Installation
We need to start by getting dependancies and such installed. Don’t need much.

Start by installing (or updating) XCode. The easiest way to do that is simply through the app store. Once installed, make sure you accept the license agreement:

sudo xcodebuild -license

I also used macports, if you use brew, or neither, you’ll have to figure some of this out yourself. (Or install macports: https://guide.macports.org/chunked/installing.macports.html)

Decide where you want to install everything. I keep all my stuff in ~/Tools. Replace ~/Tools with whatever your chosen directory is.

Next we need to download and install the FTDI driver for Mac (honestly not sure if this was necessary or not but it didn’t hurt). You can get the driver at http://www.ftdichip.com/Drivers/VCP.htm

We also need MSP430-gcc and pyserial. GoodFET doesn’t work with the newest version of pyserial but luckily the legacy version of pyserial is available.

Pyserial:

cd ~/Tools
git clone https://github.com/pyserial/pyserial-legacy pyserial-legacy
cd pyserial-legacy/pyserial
sudo python setup.py install

MSP430-gcc using macports (This is for updating manually updating firmware):

sudo port install msp430-gcc

Now we can pull down the GoodFET software.

cd ~/Tools
git clone https://github.com/travisgoodspeed/goodfet goodfet

It’s mostly python and doesn’t really require “installation”, but we’ll link everything so we can call without needing full paths all the time.

cd goodfet/client && sudo make link

Now we’ll set an environment variable so the GoodFET client knows what type hardware version we’re using. In my case, it’s the GoodFET42. It should be printed on the board.

echo "export board=goodfet42" >> ~/.bash_profile
source ~/.bash_profile

Next we actually start working with the board. Go ahead and plug it in. You should see a couple quick red LED flashes. We’re going to pull info from the board, then update it. We’re also going to install the info file to the board, but honestly I have 0 idea if that’s needed, but the internet pointed me that direction.

cd ~/Tools/goodfet/firmware
cp ./prebuilt/goodfet42.hex ./goodfet.hex
goodfet.bsl -P ./goodfet.hex --dumpinfo > ./info.txt
goodfet.bsl -P ./goodfet.hex --fromweb
board=goodfet42 make installinfo 

Don’t ask me why we’re calling out the board var in that last command. It errors without it sometimes. But, that’s basically it, but we’ll run a couple of quick checks to make sure everything worked.

goodfet.monitor info

You should get something similar to:

$ goodfet.monitor info
GoodFET with f26f MCU
Clocked at 0x8fa9

Next, run a self-test with:

goodfet.monitor test

This could take quite some time, but let it finish. There should be basically no output. If you see no errors, you’re good to go start hacking shit. If you DO get any errors, either you screwed up somewhere on the steps, or I did. Feel free to post below, and I’ll see if I can help (probably not though).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.