Teensy Arduino

From BackTrack Linux
Jump to: navigation, search

Up and running with Teensy Arduino

As of BackTrack 5 R3, we have included the Arduino / Teeny development package in BackTrack. This allows for rapid development and deployment of new and existing Teensy payloads.

What's this all about?

If you're new to the Teensy, you might want to check up on the following links to get acquainted with it's features and possibilities:

Required Hardware

Of course, you'll need a Teensy board. We are using a Teensy 2.0 for this guide. You can get them at the PJRC store - http://pjrc.com/store/teensy.html

Using VMWare as the development environment

Using VMWare as the development environment requires a bit more button pressing than using real hardware. VMWare USB hardware identification of the Teensy can be tricky at times, as the Teensy can show up as several different devices.

  • Start by powering up the BT VM image, and logging on.
  • Plug in the Teensy to the USB port , and press the "Reboot" button on the Teensy.
  • Navigate to your VMWare USB device list. You should see a new device named "VOTI Input Device", as shown below.
  • Select this device and close the VMWare USB device list window.


Plugging in the Teensy

Please note the following:

  • Pressing the reboot button once on the Teensy once you plug it in, prevents it from running its payload.
  • Pressing the reboot button twice on the Teensy once you plug it in, reboots it.

Once the Teensy is plugged in (and you pressed the reboot button), you should see the following in your dmesg output:

root@bt:~# dmesg
[15045.574397] usb 2-2.1: new full-speed USB device number 8 using uhci_hcd
[15046.220273] generic-usb 0003:16C0:0478.0005: hidraw2: USB HID v1.11 Device [HID 16c0:0478] on usb-0000:02:00.0-2.1/input0

Getting a sample sketch uploaded to the Teensy

  • Before getting started, enter this command in the command prompt, to enable faster recognition of the Teensy by BackTrack:
root@bt:~# echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[7-9]?", GOTO="nm_modem_probe_end"' >>/lib/udev/rules.d/77-nm probe-modem-capabilities.rules
  • Open up the Arduino IDE in Backtrack:


  • Select the correct development board.
Tools ->Board->Teensy 2.0 (or as appropriate)
  • Select the relevant USB features you want in your build.
Tools ->USB Type ->"Serial + Keyboard + Mouse + Joystick" (or as appropriate)

  • Load a sample sketch - we will use "Blink" for our example.
  • Your IDE should look similar to the following:


  • Make any required changes. For example, if you are using a Teensy 2.0, the Led Pin should be changed to 11..
  • Compile the Sketch and "verify" it by pressing the "V" on the top left corner of the Arduino IDE.


  • Upload your compiled sketch by pressing the "Upload" button:


  • If this is the first time you have uploaded an image to the Teensy, you should see something similar to this the the bottom of your IDE:


  • Press the reboot button on your Teensy. You should see the Teensy loader "do it's thing" - uploading and saving the image to the Teensy:


  • Your Teensy device should be blinking now.

Going Hardcore

Now that you have your toolchain ready and IDE fired up, you're ready to apply some more significant payloads to the Teensy device. Several good places to start looking for interesting payloads are Irongeek's PHUKD libraries, the Social Engineering Toolkit and Kautilya, with the latter two present in BackTrack. You can also check out the Offensive Security "Peensy" Payload, as presented here - http://www.offensive-security.com/offsec/advanced-teensy-penetration-testing-payloads/