diff --git a/README.md b/README.md index c263c9a..ed95dcc 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,20 @@ The easiest way to so is by using a jumper wire between those pins as seen bello ![Setup mode with a jumper](images/setup-mode.png) +### USB enable/disable mode + +If you need the pico-ducky to not show up as a USB mass storage device for stealth, follow these instructions. +Enter setup mode. +Copy boot.py to the root of the pico-ducky. +Copy your payload script to the pico-ducky. +Disconnect the pico from your host PC. +Connect a jumper wire between pin 18 and pin 20. +This will prevent the pico-ducky from showing up as a USB drive when plugged into the target computer. +Remove the jumper and reconnect to your PC to reprogram. +The default mode is USB mass storage enabled. + +![USB enable/disable mode](images/usb-boot-mode.png) + ## Useful links and resources ### Docs diff --git a/boot.py b/boot.py new file mode 100644 index 0000000..dbf2b1e --- /dev/null +++ b/boot.py @@ -0,0 +1,16 @@ +from board import * +import digitalio +import storage + +noStorageStatus = False +noStoragePin = digitalio.DigitalInOut(GP15) +noStoragePin.switch_to_input(pull=digitalio.Pull.UP) +noStorageStatus = not noStoragePin.value + +if(noStorageStatus == True): + # don't show USB drive to host PC + storage.disable_usb_drive() + print("Disabling USB drive") +else: + # normal boot + print("USB drive enabled") diff --git a/images/usb-boot-mode.png b/images/usb-boot-mode.png new file mode 100644 index 0000000..1bdb897 Binary files /dev/null and b/images/usb-boot-mode.png differ