Step One – Install Digispark drivers
- Go to the Digispark repo at https://github.com/digistump/digistumparduino/releases
- Download Digistump.Drivers.zip for your operating system
- Extract and run DPinst.exe (x86) or DPinst64.exe (x64)
Step Two – Download and install the Arduino IDE
- Download from https://www.arduino.cc/en/software
- Install
Step Three – Configure Arduino IDE for the Digispark
- Add the Digispark board manager index within the Arduino IDE by navigating to:
- File > Preferences > Additional boards manager URLs
- Paste:
http://digistump.com/package_digistump_index.json
- Click OK
- Install the Digispark boards within the Arduino IDE by navigating to:
- Tools > Boards > Board Manager
- Filter for and select
Digistump AVR Boards by Digistump
and click install
- Set Digispark as default within the Arduino IDE by navigating to and selecting:
- Tools > Boards > Digistump AVR Board > Digispark (Default – 16.5mhz)
Step Four – Create your first Rubber Ducky script
- Create a new sketch with File > New sketch
- Paste the following code:
#include “DigiKeyboard.h”
void setup() {
// No setup scripting is required, but this function is needed
}
void loop() {
// This is generally not necessary but with some older systems it seems to
// prevent missing the first character after a delay:
DigiKeyboard.sendKeyStroke(0);
// Open a command prompt
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboard.delay(500);
DigiKeyboard.println(“cmd”);
DigiKeyboard.delay(500);
// Execute the following function in a command prompt
DigiKeyboard.println(“echo Pwned by Redacted Information Security”);
DigiKeyboard.delay(500);
// Blink the red LED when the code has finished executing
while (true)
{
digitalWrite(0, HIGH);
digitalWrite(1, HIGH);
delay(300);
digitalWrite(0, LOW);
digitalWrite(1, LOW);
delay(300);
}
}
- Click on ‘Verify’ (the tick icon) to ensure that the code will work.
- Click on ‘Upload’ (the arrow icon) and plug in the Digispark when invited to
- Once the code has uploaded, you’re done! Have fun playing with the code 🙂