knowledge/technology/devices/Raspberry Pi Pico Rubberducky.md

59 lines
212 KiB
Markdown
Raw Normal View History

2024-03-03 16:17:05 +00:00
---
obj: device
repo: https://github.com/dbisu/pico-ducky
---
# Raspberry Pi Pico Rubberducky
You can turn your [Raspberry Pi Pico](Raspberry%20Pi%20Pico%20W.md) into a [Rubberducky USB](Rubberducky%20USB.md).
## Quick Start Guide
Install and have your USB Rubber Ducky working in less than 5 minutes.
1. Download the latest release from the [Releases](https://github.com/dbisu/pico-ducky/releases) page.
2. Plug the device into a USB port while holding the boot button. It will show up as a removable media device named `RPI-RP2`.
3. Install CircuitPython on the Pico or Pico W
If using a Pico board:
Copy the `adafruit-circuitpython-raspberry_pi_pico-en_US-8.0.0.uf2` file to the root of the Pico (RPI-RP2). The device will reboot and after a second or so, it will reconnect as `CIRCUITPY`.
If using a Pico W board:
Copy the `adafruit-circuitpython-raspberry_pi_pico_w-en_US-8.0.0.uf2` file to the root of the Pico (RPI-RP2). The device will reboot and after a second or so, it will reconnect as `CIRCUITPY`.
1. Copy the `lib` folder to the root of the `CIRCUITPY`
5. Copy `*.py` to the root of the `CIRCUITPY`
6. Follow the instructions in `README.md` to enter setup mode
7. Copy your payload as `payload.dd` to the root of the `CIRCUITPY`
8. Unplug the device from the USB port and remove the setup jumper.
Enjoy your Pico-Ducky.
## Setup Mode
To edit the payload, enter setup mode by connecting the pin 1 (`GP0`) to pin 3 (`GND`), this will stop the pico-ducky from injecting the payload in your own machine. The easiest way to do so is by using a jumper wire between those pins as seen bellow.
![Pico](data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUEAAAGNbWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAsaWxvYwAAAABEAAACAAEAAAABAAACMAAAXzIAAgAAAAEAAAG1AAAAewAAAEJpaW5mAAAAAAACAAAAGmluZmUCAAAAAAEAAGF2MDFD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zx9XQKQsyJ2jNw8Eczmn7UrAb7YtUh0y0Ym86WlaNVFqwVnqpsIgwQkzZFIyWIKB+NVnzUvn/J6PHwQjrlzaoR6ZSU/UZOrKSqbCQj0N0+6NOTAJ/7cr2CsxTDcMSUHu7ipky3uGImCyuWQQXYU8HwCQhiCvtxkbDldaM21/uIJT6nrrBiEfk2pGWuz7phhO3crrltrr7lCyQWV8NS0BGE/dkolq38sarmrlGgncF6uFwV2ZWnFrlikQNpXxt9mbKkQ+0Xf8WacbsBRNDEk/cs+8RV38Z7sVIQpjTs4oXhYHrtkokET7K2qZiR5mSzx2o5yOFPU1bFjuY0/ebDbvVZnM/eGOvMyhFGjPN5f56/PwKpeCMRq2hg6/P6BKpwuxbefeLffqtJZRM5yoQTPHQ19VVo8MMh05AHForQUb4VIKwk0ULIeq52KNl6q1WInIDf9OrFWKK/rc7+LbqQ0lTRFyAdkW1XOCtZQSo3KMQT7GY1n6RQbkIf7AZbgHBE+2q26q7mN9XlHZnhH7+lm0+fOrsuLQD78hVnm7azmUwO0k4/CmQM7+pKiWQVR5lpeCQhc
## 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 your payload script to the pico-ducky.
- Disconnect the pico from your host PC.
- Connect a jumper wire between pin 18 (`GND`) and pin 20 (`GPIO15`).
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.
**Pico**: The default mode is USB mass storage enabled.
**Pico W**: The default mode is USB mass storage **disabled**
![Pico](data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUEAAAQobWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAA6aWxvYwAAAABEAAADAAEAAAABAAAwXwAB4f8AAgAAAAEAAARQAAAarAADAAAAAQAAHvwAABFjAAAAbWlpbmYAAAAAAA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euaL7Uk/4Vrb7LkNIY0RvnAKvx07560fW/7vWw3NK/+HmPUzNGqhiwwehoM0YUMWGD0NeXXWpR/wDCtIQlyGcxqjfMAVfjp3z1pbjUoz8NIgtwGcxqjZcZV+OnfPX+dH1v+71sDnFf+A8x6gZowoYuMHoaDNGqhi4we9eaz3J/4VrEEkLObcFzu+6fUd85qF9UhHw2jRbgGQxeW4LgFX7e+f8A9dJYy/2etgckt/5eY9QM0YUMWGD0oM0YUMWGD3rzE6rD/wAK1RRcAy+UY2BbBD9sd8//AK6T+14E+GgH2lTKIWjcFsEPzjA65z/PNV9a/u9bC9pHv9nmPTzNGEDbhg9DQZowobcMHoa8wh1eA/DRVFwDKYmjcFsENzjjrnP6c1PFdr/wrdUSYFzbvvJfGDhsY9TnilLF23j1sCmnt/LzHpBmjCByw2nvQZowgbcNp715jDq9uvw48sXIMxieNlLcqxyBx1Jzj8DmiDV7dPhx5QuVM3lPG6l+VY7scdSc4/Dmj60/5ethKpF9fs8x6cZowgfcNp70GeMJvLjb615lb6vbJ8NzD9oUz+TJ
## Pico W Web Service
The Pico W AP defaults to ip address `192.168.4.1`. You should be able to find the webservice at `http://192.168.4.1:80`
The following endpoints are available on the webservice:
- `/`
- `/new`
- `/ducky`
- `/edit/<filename>`
- `/write/<filename>`
- `/run/<filename>`
### API endpoints
- `/api/run/<filenumber>`