Added USB enable-disable mode (#25)

This commit is contained in:
dbisu
2021-10-03 15:19:54 -05:00
committed by GitHub
parent 83eba10713
commit 003cede2b3
3 changed files with 30 additions and 0 deletions

View File

@@ -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) ![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 ## Useful links and resources
### Docs ### Docs

16
boot.py Normal file
View File

@@ -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")

BIN
images/usb-boot-mode.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB