Wednesday, April 4, 2012

Teensy USB HID for Penetration Testers - Part 1 - Introduction and Arduino Installation

My first blog post after two back to back awesome conferences Black Hat Europe and Troopers. At Black Hat Europe I conducted a workshop called Teensy Programming for Everyone. The workshop was well recieved by most of the participants. But I found that many of them found it difficult to setup Arduino for usage with Teensy and other basic stuff. So keeping in mind my upcoming trainings at Shakacon and GrrCON I am starting this series of blog posts which during initial posts will detail the basics of Teensyduino installation, structure of sketches and usage of Teensy. In later posts, I will cover Kautilya and its usage. So let's get started.

Teensy is a programmable USB HID from nice guys at I use Teensy++ (which is an improved version of Teensy) in Penetration Tests for its ability to be used as a programmable keyboard. To start with, this is how you can install Arduino with Teensyduino:

For Windows (Tested on Windows 7 and XP) as an Adminsitrator

1. Download Arduino for Windows.

2. Extract the zip archive.

3. Download Teensyduino for Windows which is a plugin for Arduino. We require this to add support for Teensy in Arduino.

4. Download Windows Serial Installer

5. Run the the downloaded Serial Installer. You will get a warning as the driver is not signed by MicroSoft. Accept it and continue with the installation.

6. Run the Teensyduino, it will check for installed serial driver.Provide the path for the folder where Arduino has been extracted, the "Next" button will be activated only if a Arduino is found at the provided location.

You can choose more libraries to install on the next screen. You can choose to install none, Teensy does not require them.

7. Now you should see more options in Arduino.

For Linux (Tested on Backtrack 5)

1. Download Arduino for Linux.

2. Extract the zip archive.

3. Download Teensyduino 32bit or Teensyduino 64bit depending on your OS. We require this to add support for Teensy in Arduino.

4. Download udev rules. This is required to use Teensy as non root user.

5. Install udev rules

sudo cp 49-teensy.rules /etc/udev/rules.d/

6. Run the Teensyduino, provide the path for the directory where Arduino has been extracted.

7. Now you should see more options in Arduino.

This is it for the first post. Please leave comments and feedback.

UPDATE: If you are facing problems when using Linux make sure you have installed all the dependencies. Read this for more details


  1. Plz help...where can i buy a teensy...i reside in DELHI

  2. I always buy it from the makers Never tried it, but heard good things about

  3. No Mac OS X guide? I know there is Arduino and Teensyduino for OS X but is there anything else that needs to be done? Similar to step 4 in both of the guides above.

    1. Sorry, I have tested setting it up on OS X. This could be helpful: