Installing ChipWhisperer

1,094 bytes added, 16:48, 25 January 2017
no edit summary
== Using VMWare Virtual Machine ==This page describes how to install the ChipWhisperer software. There are a number of ways to set this up: you can use a pre-prepared virtual machine, or you can run the software on your own environment.
=Using VMWare Virtual Machine =If this is your first time using the ChipWhisperer toolchain, the easiest way to start is to use a virtual machine with everything already set up for you. The ChipWhisperer virtual machine image is made to run on the free VMWare Player. You can download VMWare 7.1.4 [ here]. Note that this program is available for Windows and Linux - if you're running a Mac, you're out of luck.  Once you've downloaded VMWare, you can get the ChipWhisperer Ubuntu image from the [ Releases Page]. Download and unzip the VMWare image. Then, you can open the file <code>ChipWhisperer Lubuntu 32-bit.vmdk</code> in VMWare Player, and you're ready to go. There's a [ Youtube tutorial] of this setup available online. = Windows (XP or later) ==
This section describes how to install the ChipWhisperer software for Windows. Note it is recommended to use the VMWare image if possible, since it includes all required tools out of the box!
=== Python Setup ===
The first step is to install Python 2. If you already a recent version of Python installed (2.7.x), you can skip this step. Note that Python 3.x will not work with this codebase.
=== Getting &amp; Installing ChipWhisperer ===
Assuming you've got a working Python installation, the next step is to install &amp; run ChipWhisperer itself. This requires you to get a copy of ChipWhisperer, you should download the [ Latest Release]. Download &amp; unzip the file somewhere. Note if you are adventurous you can clone the GIT Repository <code>git://</code> instead, but this '''may be broken''' so you should start with the latest release instead.
=== Installing Hardware Drivers ===
Details of driver installation are on specific pages for supported hardware (such as hwcapturerev2 and naecw1173_cwlite). Drivers are available from [ ChipWhisperer] release section.
=== Getting AVR Compiler Toolchain ===
The following section is '''NOT REQUIRED''' for your first attack - you can jump right to the tutorial if you wish. However you'll ultimately wish to modify the code of the device under test, and these instructions tell you how. You should first follow the tutorial to confirm your system is working before modifying the code however!
<li>Programming the target AVR is accomplished in one of two methods depending on your hardware. The ChipWhisperer Capture Rev 2 uses the external "AVR Studio" program, whereas the CW1173 and CW1200 use a programmer menu from the ChipWhisperer-Capture software. To see details refer to either [[CW1002_ChipWhisperer_Capture-Rev2#CWCR2:_Using_the_AVR_Programmer]] or [[CW1173_ChipWhisperer-Lite#CW-Lite:_Programming_AVR.2FXMEGA_Device]].</li></ol>
== Linux ==
=== Python Setup ===
On Linux, installing Python &amp; all the associated packages is much easier than on Windows. Typically you can install them from a package manager, if you are using Fedora Core or similar, just type:
=== Getting ChipWhisperer ===
As in the Windows release, you can download a complete ChipWhisperer software release. Alternatively you can clone the ChipWhisperer repository with git, which is very simple on Linux:
'''NB''': This assumes the python command links to Python-2.7, and not Python-3.x. You may need to specify either python2.7 or python27 as the command instead of python to force this.
=== Hardware Drivers ===
The ''driver'' for Linux is built in, however you need to allow your user account to access the peripheral. To do so, you'll have to make a file called <code>/etc/udev/rules.d/99-newae.rules</code> . The contents of this file should be:
=== FTDI Hardware Driver (SASEBO-W, SAKURA-G, SASEBO-GII) ===
'''This is only required for supporting FTDI-connected hardware''' such as the SASEBO-W, SAKURA-G, SASEBO-GII. This is NOT required for the ChipWhisperer Capture Rev2.
Finally log out &amp; in again for the group change to take effect.
== MAC OS X ==
The following have been tested on Mac OS X Yosemite (10.10) - earlier versions may not have a recent enough Python installation (recommended 2.7.6 or later). It's possible to install other Python versions on your Mac OS X via the 'homebrew' system, we will use this for installing a few additional required tools.
=== Python Setup ===
<ol style="list-style-type: decimal;">
$ echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/macmini/Library/Python/2.7/lib/python/site-packages/homebrew.pth</pre></li></ol>
=== Working SciPy Distribution ===
You may need to upgrade your scipy from the base install, if you wish to do template attacks. This is not needed for other attacks, so please only proceed with the following if you receive an error that your version of scipy is too old.
brew link --overwrite numpy
=== AVR-GCC Install ===
You can easily use brew to install avr-gcc, as decribed at [ OSX-Cross Project]:
$ brew install avr-libc
== Making sure that everything works ==
Try running the automated test scripts at chipwhisperer/software/chipwhisperer/tests/. Example:
$ python chipwhisperer/software/chipwhisperer/tests/