Difference between revisions of "USB Rubber Ducky: Firmware Update"

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search
m
m (minor corrections)
 
Line 1: Line 1:
== Summary ==  
== Summary ==  


This article consists of a short guide on changing or updating the USB Rubber Ducky firmware. It is intended as a supplement to the existing online guides since those are partly out of date.
This article consists of a short guide on changing/updating the USB Rubber Ducky firmware. It is intended as a supplement to the existing online guides since those are partly out of date.


== Requirements ==
== Requirements ==


* Host PC running Ubuntu Linux or a Virtual Machine (tested on 20.04 LTS)
* Ubuntu Linux (tested on 20.04 LTS) or similar


== Description ==
== Description ==


We will be using the Ducky-Flasher utility by kmichael500 which is provided here (https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Flashing-ducky#DuckyFlasher_Utility) and we will make certain adjustments to get it to run on a modern Ubuntu Linux system. The afore mentioned guide also provides ways to update firmware on Windows or OSX, but we could not get those to work on current Operating Systems.
We will be using the Ducky-Flasher utility by kmichael500 which is provided [https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Flashing-ducky#DuckyFlasher_Utility here] and we will make certain adjustments to get it to run on a modern Ubuntu Linux system. The afore mentioned guide also provides a way to update firmware on Windows, but this way does not seem to work with current Windows versions. If you want to update the firmware manually you can follow the Unix/OSX guide, which uses the dfu-programmer package like the Ducky-Flasher utility does and should also work on Linux.


# Install dfu-programmer<br/><code>apt-get install dfu-programmer</code>
# Install dfu-programmer<br/><code>apt-get install dfu-programmer</code>
# Install Python 2.x<br/><code>apt-get install python2</code>
# Install Python 2.x<br/><code>apt-get install python2</code>
# Download and unzip Ducky-Flasher<br/><code>wget https://github.com/hak5darren/USB-Rubber-Ducky/raw/master/Flash/ducky-flasher1.0.zip</code><br/>unzip ducky-flasher1.0.zip
# Download and unzip Ducky-Flasher<br/><code>wget https://github.com/hak5darren/USB-Rubber-Ducky/raw/master/Flash/ducky-flasher1.0.zip</code><br/><code>unzip ducky-flasher1.0.zip</code>
# Open ducky-flasher with your favourite text editor and change the Shebang to <code>#!/usr/bin/env python2</code>
# Open ducky-flasher and change the Shebang to </br><code>#!/usr/bin/env python2</code>
# (optional) Ducky-Flasher provides four different firmware images (Original, FAT Duck, Detour Duck and Twin Duck).<br/>If you want to use a different firmware image you can either rename the file and overwrite to the corresponding file in the ducky-flasher/firmware directory or modify the Ducky-Flasher program itself to add new firmware. Firmware images can be found [https://github.com/hak5darren/USB-Rubber-Ducky/tree/master/Firmware/Images here].
# (optional) Ducky-Flasher provides four different firmware images (Original, FAT Duck, Detour Duck and Twin Duck).<br/>Additional firmware images can be found [https://github.com/hak5darren/USB-Rubber-Ducky/tree/master/Firmware/Images here]. If you want to use one of these image you can rename it and overwrite a image file in <code>ducky-flasher/firmware</code> or modify the Ducky-Flasher program itself to add new firmware.  
# Install the Ducky-Flasher<br/><code>sudo python2 setup.py</code>
# Install the Ducky-Flasher<br/><code>sudo python2 setup.py</code>
# Connect the Rubber Ducky in DFU mode by keeping the button pressed while plugging it in.
# Connect the Rubber Ducky in DFU mode by keeping the button pressed while plugging it in.

Latest revision as of 05:59, 8 July 2022

Summary

This article consists of a short guide on changing/updating the USB Rubber Ducky firmware. It is intended as a supplement to the existing online guides since those are partly out of date.

Requirements

  • Ubuntu Linux (tested on 20.04 LTS) or similar

Description

We will be using the Ducky-Flasher utility by kmichael500 which is provided here and we will make certain adjustments to get it to run on a modern Ubuntu Linux system. The afore mentioned guide also provides a way to update firmware on Windows, but this way does not seem to work with current Windows versions. If you want to update the firmware manually you can follow the Unix/OSX guide, which uses the dfu-programmer package like the Ducky-Flasher utility does and should also work on Linux.

  1. Install dfu-programmer
    apt-get install dfu-programmer
  2. Install Python 2.x
    apt-get install python2
  3. Download and unzip Ducky-Flasher
    wget https://github.com/hak5darren/USB-Rubber-Ducky/raw/master/Flash/ducky-flasher1.0.zip
    unzip ducky-flasher1.0.zip
  4. Open ducky-flasher and change the Shebang to
    #!/usr/bin/env python2
  5. (optional) Ducky-Flasher provides four different firmware images (Original, FAT Duck, Detour Duck and Twin Duck).
    Additional firmware images can be found here. If you want to use one of these image you can rename it and overwrite a image file in ducky-flasher/firmware or modify the Ducky-Flasher program itself to add new firmware.
  6. Install the Ducky-Flasher
    sudo python2 setup.py
  7. Connect the Rubber Ducky in DFU mode by keeping the button pressed while plugging it in.
  8. Start the Ducky-Flasher and follow the instructions
    sudo ducky-flasher
  9. (optional) Uninstall the Ducky-Flasher
    sudo python2 uninstall.py

References