As of August 2020 the site you are on (wiki.newae.com) is deprecated, and content is now at rtfm.newae.com.

Changes

Jump to: navigation, search

Installing ChipWhisperer/Required Tools - Windows

1,290 bytes added, 14:06, 31 May 2019
no edit summary
<h4> Python </h4>
For any of the other installation methods, you'll need to have Python 2 installed on your computer. 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. There's also a bit of setup that's needed to get other tools and prepare other drivers.
== Python ==
The recommend method of installing Python is to use a distribution called [http://winpython.github.io/ WinPython]. This setup avoids installing Python globally, and includes most of the software you will need. In addition it makes it possible to install 32-bit and 64-bit Python on the same system with minimal problems. This can be very useful as the 64-bit version is handy for doing analysis on large data sets.
<ol style="list-style-type: decimal;"><li>Install To install WinPython 2.7.x. , Download the latest a release in the 2.7.x branch from the [http://winpython.github.io/ WinPython] site. It's recommended to use the 32-bit version, but you can also use the 64-bit version. Note Also, note that certain drivers the recent releases (such as the SmartCard driver) ''do not'' work on the 64-bit version. Choose a reasonable location to install this to - note the default is simply in the download directory. Instead it's recommended to find a directory such as <code>c:\WinPython32bit-2.7.10.3</code>, or into your local directory such as <code>c:\Users\yourname\like WinPython-32bit-2.7.1013.3</code>.</li><li>Go to your installation directory for WinPython, and run the shortcut called 0Zero) don'''WinPython Command Prompt.exe'''. This will give you a command prompt which is setup to run Python along t come with associated scripts.</li></ol><ol style="listany pre-style-type: decimal;"><li><p>Run the following commands to get needed installed packages:</p><pre>pip install pyqtgraphpip install configobj</pre><p>Assuming you are planning on using the ChipWhisperer Capture Rev2 hardware, you also require . We recommend [httphttps://sourceforge.net/projects/pyusbwinpython/ PyUSB]. The easiest method is to again use pip:<files/p><pre>pip install pyusb</pre><p>If that command fails, you may need to specify a versionWinPython_2. Note the latest version printed by the command, and try:<7/p><pre>pip install pyusb==12.07.0b1</pre></li><li><p>Optional: You can add the python10.exe you just installed to your path. To do so navigate to your installation folder, and run the '''WinPython Control Panel.exe''' program. Then select ''Advanced -&gt; Register distribution...''. If you do not do this, you will have to run all commands in this document via the '''WinPython Command Prompt.exe'''.<3/p><p>If you plan on running both 32-bit and 64-bit Python, you should not register them. Instead explicitly call the correct Python by always running the '''WinPython Command Prompt2.exe''', and then calling specific programs (such as CW Capture or Analyzer) from that command prompt7.</p></li><li>Jump to [[#Getting_10.26_Installing_ChipWhisperer3]] to install ChipWhisperer software.</li></ol>
Note there are some optional packages you may wantthat certain drivers (such as the SmartCard driver) ''do not'' work on the 64-bit version. Generally you can avoid them unless you have specific need of Choose a reasonable location to install this to - note the features they enabledefault is simply in the download directory. Instead it's recommended to find a directory such as <code>c:\WinPython32bit-2.7.10.3</code>, or into your local directory such as <code>c:\Users\yourname\WinPython-32bit-2.7.10.3</code>.
Go to your installation directory for WinPython, and run the shortcut called '''FTD2XXWinPython Command Prompt.exe'''. This will give you a command prompt which is setup to run Python along with associated scripts. ''Optional'': You can add the python.exe you just installed to your PATH. To do so navigate to your installation folder, and run the '''WinPython Control Panel.exe''' program. Then select ''Advanced -> Register distribution...''. If you do not do this, you will have to run all commands in this document via the '''WinPython Command Prompt.exe'''. If you plan on running both 32-bit and 64-bit Python, you should not register them. Instead explicitly call the correct Python by always running the '''WinPython Command Prompt.exe''', and then calling specific programs (such as CW Capture or Analyzer) from that command prompt. <h4> Python Packages </h4>There are a number of packages that the ChipWhisperer project uses. You'll need to install these so that the software can run. Note that the PyPi install process should automatically install these, so you shouldn't need to manually install everything there. Run the following commands to get the needed packages:* '''PyQTGraph:''' <code>pip install pyqtgraph</code>* '''ConfigObj:''' <code>pip install configobj</code> You might also need some extra packages. Generally you can avoid them unless you have specific need of the features they enable: '''PyUSB:''' if you're planning to use the ChipWhisperer Capture Rev2 hardware, this is necessary. You can install this using pip:* <code>pip install pyusb</code>* If that fails, try specifying the latest version, like: <code>pip install pyusb==1.0.0b1</code> '''FTD2XX:''' [https://github.com/snmishra/ftd2xx ftd2xx] is required for SASEBO-W, SAKURA-G, and SASEBO-GII Support. To install this package, [https://github.com/snmishra/ftd2xx/archive/master.zip download a copy of the ftd2xx repository] and unzip it somewhere. Then run the following where you unzipped it:
<pre>python setup.py install</pre>
This package will also require you to install the [http://www.ftdichip.com/Drivers/D2XX.htm FTDI D2XX Drivers]. In the preceeding link simply find the correct driver for your OS Version &amp; and install that.
'''MYSQL:''': If you want to use the MySQL trace format (not used by default), you'll need to install [https://pypi.python.org/pypi/umysql umysql]:
<pre>pip install umysql</pre>
'''PYSCARD''': If planning on using a PS/SC smartcard reader (i.e. standard USB-connected reader), you will need to install [https://sourceforge.net/projects/pyscard/files/pyscard/ pyscard].
== Installing Hardware Drivers =='''PYSCARD:''' If planning on using a PS/SC smartcard reader (i.e. standard USB-connected reader), you will need to install [https://sourceforge.net/projects/pyscard/files/pyscard/ pyscard].
Details of driver installation are on specific pages for supported hardware (such as hwcapturerev2 and naecw1173_cwlite). <h4> Installing Hardware Drivers are available from [http:<//chipwhisperer.com ChipWhisperer] release section.h4>
== Getting AVR Compiler Toolchain ==Details of driver installation are on specific pages for supported hardware (such as cwcapturerev2 and naecw1173_cwlite). Drivers are available from [http://chipwhisperer.com ChipWhisperer] release section.
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!<h4> Getting AVR Compiler Toolchain </h4>
To build The following section is not required for your first attack - you can jump right to the code, tutorial if you wish. However you'll need ultimately wish to install WinAVR on Windows (if using modify the Virtual Machinecode of the device under test, and these instructions tell you how. You should first follow the following tutorial to confirm your system is ''not required'', as working before modifying the VM comes setup with the AVR compiler already).code however!
Note that To build the default codebase ''does not'' include the cryptographic code we attack. Instead , you are required 'll need to add this code into the system -install avr- gcc on Windows (if using the external code changesVirtual Machine, this may eventually be instead rolled into the main codebase. To following is ''not required'', as the VM comes setup with the codeAVR compiler already). On Windows, follow the following stepsyou could choose to install:
<ol style="list* Atmel AVR-styleGCC standalone -typesee [http: decimal;">//www.atmel.com/tools/atmelavrtoolchainforwindows.aspx Atmel avr-gcc standalone] (registration required)* WinAVR. Last release - 2010, see [https://sourceforge.net/projects/winavr/files/latest/download?source=typ_redirect WinAVR Page] (no registration required) To test the code build, follow these steps: <li><p><code>cd</code> to the directory with the avr-serial example, and run <code>make</code>:</p>
<pre>cd c:\chipwhisperer\hardware\victims\firmware\simpleserial-aes
make</pre>
<p>If this is successful, you'll see an output like the following:</p>
<p>[[File:Avr-build-ok.png|image]]</p>
<p>If instead you get an error something like <code>make: *** No rule to make target `simpleserial.elf', needed by `elf'. Stop.</code>, this means a required file was missing.</p></li><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  For details refer to either about programming the targets, see [[CW1002_ChipWhisperer_Capture-Rev2#CWCR2:_Using_the_AVR_ProgrammerTutorial B1 Building a SimpleSerial Project]] . <h5> WinAVR Path Settings </h5> By default, WinAVR is added to your system path. This means you can run avr-gcc, make and other programs from your normal Windows command line. You may not want this on certain systems where you already have similar tools installed. In which case either uncheck the Add WinAVR to Path option, or [[CW1173_ChipWhispereredit your system path to remove the WinAVR directories. If you do not add it to the system path, you’ll need a method of readding the WinAVR directories when you want to use WinAVR. To do so create a file called winavr.bat in C:\WinAVR-Lite#CW20100110 with the following contents:  set PATH=%PATH%;C:\WinAVR-Lite20100110\bin;C:_Programming_AVR\WinAVR-20100110\utils\bin cmd Now when you want to run WinAVR (e.2FXMEGA_Device]]g.<to continue the examples here), you can simply double-click on the winavr.bat file. This will configure the path for just that terminal, rather than every terminal you open. Note if using WinAVR on Windows 8.1/li><10, you must replace the dll msys-1.0.dll with an updated version. See [http:/ol>/www.avrfreaks.net/forum/windows-81-compilation-error Windows 8.1 Fix] for a link to this DLL replacement.
Approved_users, administrator
366
edits

Navigation menu