DigiKeyboard reference | DigiMouse reference (only one can be used at a time)
We want to use Digispark to delivery the payload while still keeping the keyboard functional, so a usb hub is needed. The internal keyboard PCB is connected to the usb hub, and digispark is also connected to up. The upstream port of the usb hub is what will be conneted to the computer.
By default, the Digispark have a 5 second programming delay once plugged in for uploading new code. This has caused issues for Windows to fail to recognise Digispark as a USB device when it is conected to the hub with another keyboard, a new bootloader is needed to remove the delay, removing the delay also allows the attack to be carred out faster.
The bootloader can be found here under the name micronucleus-1.11-entry-jumper-pb0-upgrade.hex
, the program to fash the bootloader can be found here.
To flash the firmware, unzip the micronucleus folder, in a command prompt, enter the full path of micronucleus.exe, followed by the full path of the bootloader hex file, then plug in Digispark to the the computer.
Ater the bootloader is flashed, the delay should be removed. To program digispark after flashing to the new bootloader, bridge the GND and P0 pins on Digispark with a conductive wire when uploading new code.
libraries\DigisparkKeyboard\usbconfig.h