HackerBox 0056: Demon Seed

by HackerBoxes in Circuits > USB

5140 Views, 14 Favorites, 0 Comments

HackerBox 0056: Demon Seed

WholeBoxInstruct0056.png

Greetings to HackerBox Hackers around the world! With HackerBox 0056, we will explore USB Hacking, Low-level USB signaling, micronucleus USB bit-banging with ATTiny microcontrollers, bare metal microcontroller experimentation, operation and defense of "Bad USB" cables, DemonSeed USB implants, keystroke injection payloads, RF triggers, high-speed USB passthrough, and more.

This guide contains information for getting started with HackerBox 0056, which can be purchased here while supplies last. If you would like to receive a HackerBox like this right in your mailbox each month, please subscribe at HackerBoxes.com and join the revolution!

HackerBoxes is the monthly subscription box service for hardware hackers and enthusiasts of electronics and computer technology. Join us and live the HACK LIFE.

Content List for HackerBox 0056

  • O.MG Demon Seed EDU with 2 USB Implants
  • Black MicroUSB Donor Cable 1m
  • White MicroUSB Donor Cable 1m
  • USBasp Programmer with Ribbon Cable
  • USBasp 6-to-10 pin Adapter
  • USB Hub with Four Switchable Ports
  • Digispark USB
  • ATTiny Development Board
  • MicroUSB Breakout Module
  • ATTiny85-20PU DIP-8 Integrated Circuit
  • APA106 Addressable RGB LED 8mm Round
  • Zener Diodes 3.6V
  • Resistors 68 Ohms
  • Resistors 1.5K Ohms
  • Mini Black Solderless Breadboad 170 points
  • Dual Breakaway Male Headers 2x40
  • Male-Male Dupont Jumper Wires
  • Exclusive Demon Seed EDU Sticker
  • Exclusive HackerBoxes WireHead Sticker

Some other things that will be helpful:

  • Soldering iron, solder, and basic soldering tools
  • Computer for running software tools

Most importantly, you will need a sense of adventure, hacker spirit, patience, and curiosity. Building and experimenting with electronics, while very rewarding, can be tricky, challenging, and even frustrating at times. The goal is progress, not perfection. When you persist and enjoy the adventure, a great deal of satisfaction can be derived from this hobby. Take each step slowly, mind the details, and don't be afraid to ask for help.

As always, we request that you review the HackerBoxes FAQ. There, you will find a wealth of information for current and prospective members. Almost all of the non-technical support emails that we receive are already answered in the FAQ, so we really appreciate it if you have a quick look.

USB Digispark

Digispark.png

The Digispark is an ATTiny85 based microcontroller development board similar to the Arduino line, only smaller and a bit less powerful. The Digispark is a great place to jump into microcontrollers, or perfect for when an Arduino is too large or simply overkill.

Specifications:

  • Support for the Arduino IDE 1.0+ (OSX/Win/Linux)
  • Power via USB or External Source - 5v or 7-35v
  • On-board 500ma 5V Regulator
  • Built-in USB
  • 6 I/O Pins (2 are used for USB only if your program actively communicates over USB, otherwise you can use all 6 even if you are programming via USB)
  • 8k Flash Memory (about 6k after bootloader)
  • I2C and SPI (vis USI)
  • PWM on 3 pins (more possible with Software PWM)
  • ADC on 4 pins
  • Power LED
  • Test/Status LED

For the purpose of understanding Demon Seed implants, the Digispark is significant because the ATTiny85 does not have any hardware to connect to USB. Instead, the Digispark comes preloaded with Micronucleus to bit-bang USB signals from software.

Micronucleus is a bootloader designed for AVR ATTiny microcontrollers with a minimal usb interface, cross platform libusb-based program upload tool, and a strong emphasis on bootloader compactness. It is, by far, the smallest USB bootloader for the AVR ATTiny.

Digispark Documentation

Bare Metal ATTiny85

ATTiny Bare Metal.png

A brand new ATTiny85 chip purchased from a parts supplier like Mouser or DigiKey comes completely blank. It will not have micronucleus or any other bootloader. It will need to be programmed from scratch, for example using an ISP (in-circuit programmer). Here, we will insert the bare metal ATTiny85 into the socket of an ATTiny Development Board and connect an ISP to the board for initial programming.

USBasp is a USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega88 or an ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed.

Insert the ATTiny85 into the ATTiny Development Board (mind the pin one indicator) and wire the board up the USBasp as shown here.

Add ATtiny support to your Arduino IDE (see details at High-LowTech):

Under preferences, add an entry to the list of board manager URLs for:

https://raw.githubusercontent.com/damellis/attiny/...

Under Tools->Boards->Board Mangers, add the board manager package from ATtiny by David A. Mellis.

This will add ATtiny boards to the board list, where you can now select...
Board: ATtiny25/45/85
Processor: ATtiny85
Clock: Internal 1 MHz

[IMPORTANT NOTE: Never set the clock to external clock unless the chip actually has an external clock source.]

Load the code example for "blink"

Change LED_BUILTIN to 1 in three places in that sketch and upload it to the ATtiny85 using USBasp.

The Pluggable DevBoard LED should now blink just as the LilyTiny LED did out of the box.

Turn the ATTiny Development Board into a Digispark:

So far, we've used the ATTiny Development Board as a breakout for attaching the USBasp, not technically as a Digispark. To use it as a Digispark, the ATTiny85 microcontroller will need to be programmed with the micronucleus bootloader which can be downloaded here.

Addressable LED Control

APA106.png

Even though it is quite a simple microcontroller, the ATTiny85 can be used to control addressable LEDs such as APA106, WS2812, or Neopixels.

You can control just one LED or a whole strand.

You will need to grab a library such as Neopixel or FastLED if you don't already have one.

Also, you will need to bump the ATTiny85 internal clock rate from its default 1MHz up to 8MHz using Tools->Clock. Whenever you change to the clock rate, you have to perform a "Burn Bootloader" operation under tools.

Example project.

O.MG DEMON SEED EDU

O.MG DemonSeed EDU

The O.MG DemonSeed EDU is an educational hardware implant for making good USB cables bad.

Each kit includes a 2-pack of DemonSeed implants. That means you can create two cables.

DemonSeed EDU is designed for education. Start with normal USB cables and DemonSeed will help you make them bad. You can use the Bad USB cables to program keystroke injection payloads. Also, working through O.MG's video series, you can learn to enable functionality like RF triggers, high speed USB passthrough, and more.

O.MG has links HERE to the Demon Seed EDU video series as well as a slack channel.

You can buy DEMON SEED or the powerful O.MG Cable from HAK5 here.

Also, grab some O.MG Merch from Dustrial and get 10% off with discount code OMG10.

HACK LIFE

outro.png

We hope you are enjoying this month's HackerBox adventure into electronics and computer technology. Reach out and share your success in the comments below or on the HackerBox Facebook Group. Also, remember that you can email support@hackerboxes.com anytime if you have a question or need some help.

What's Next? Join the revolution. Live the HackLife. Get a cool box of hackable gear delivered right to your mailbox each month. Surf over to HackerBoxes.com and sign up for your monthly HackerBox subscription.