HackerBox 0056: Demon Seed

3,073

13

7

Introduction: HackerBox 0056: Demon Seed

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.

Step 1: 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.

Step 2: USB Digispark

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

Step 3: Bare Metal ATTiny85

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.

Step 4: Addressable LED Control

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.

Step 5: O.MG DEMON SEED 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.

Step 6: HACK LIFE

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.

3 People Made This Project!

Recommendations

  • Tinkercad Student Design Contest

    Tinkercad Student Design Contest
  • Fashion Challenge

    Fashion Challenge
  • Space Contest

    Space Contest

7 Comments

0
seaprimate
seaprimate

8 months ago

I just want to reiterate, I love surreptitious hack projects that hide in ordinary objects. This was awesome.

0
eburman
eburman

Tip 1 year ago

I found that the USBasp programmer wiring differed from the diagram provided in the Instructable. I switched SCK and MISO and I moved the GND. See diagram. That worked for me.

0
lmperkins
lmperkins

Question 1 year ago on Step 3

I'm trying to program the attiny85 chip with the Blink sketch as described. I get a message that the computer sees the USBasp. However, when I try to load the sketch I get the following:

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

Using Port : usb
Using Programmer : usbasp
avrdude: Warning: cannot open USB device: Function not implemented
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'

avrdude done. Thank you.

the selected serial port
does not exist or your board is not connected

Any help would be appreciated. Thanks.

0
seaprimate
seaprimate

Answer 1 year ago

google the program ZADIG and change the driver for USBasp from WinUSB to libusb-win32

0
lmperkins
lmperkins

Reply 1 year ago

Thanks, I found that when I tried to get the Demonseed working. After some wiring issues, too bad the wiring harness for the Demonseed doesn't work, I've got it working.

0
patsnyder07
patsnyder07

1 year ago

I found it to be a pain to hold the DemonSeed jig in place while you have to upload the bootloader and program it so I designed a 3D printed holder to do that for me. I guess you could say I'm clumsy and lazy, and yet bored and tech savvy and I don't like screwing up bootloading. https://www.thingiverse.com/thing:4543598

0
seaprimate
seaprimate

Tip 1 year ago

If you get the error
"could not find USB device with vid=0x16c0 pid=0x5dc"
then google the program ZADIG and change the driver for USBasp from WinUSB to libusb-win32 and it should work. Also don't forget to add pinMode(2, OUTPUT); and digitalWrite(2, HIGH); to your sketches before uploading them, or else the demon seed cable will just connect then disconnect a second later.