This project leverages FreeRTOS to control a Raspberry Pi Pico to emulate a USB keyboard. The goal is to execute specific instructions (such as opening websites or performing other automated tasks) via a custom set of scripts, in other words, a bad usb.
The project is designed to run on the Raspberry Pi Pico and uses FreeRTOS. The core functionality is to detect and parse instructions that simulate keyboard inputs, sending specific key sequences to a host device.
- USB Keyboard Emulation
- Runs on Raspberry Pi Pico with FreeRTOS
- Allows automated keyboard input based on predefined instructions
- Example instruction to open Rick Astley's "Never Gonna Give You Up" in the Brave browser.
To get started with this project, follow the steps below:
Before you start, you need the following:
- Raspberry Pi Pico board.
- FreeRTOS kernel.
- pico-sdk.
Make sure that you have Git and CMake installed on your system. Additionally, ensure that you have a suitable toolchain installed for compiling and flashing the code to your Raspberry Pi Pico.
Clone the main repository:
git clone https://github.com/randcanary/pico_ducky_c.git
cd pico_ducky_cClone the FreeRTOS kernel repository:
git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.git
cd FreeRTOS-KernelAnd move to the smp branch that supports multiple core:
git checkout -t remotes/origin/smp
git submodule update --initClone the Pico SDK repository:
git clone https://github.com/raspberrypi/pico-sdk.git
cd pico-sdk
git submodule update --initYou can now set up CMake and build the project:
mkdir build
cd build
cmake ..
makeHave fun creating new scripts in the scripts folder, include the file in runner.c and call it in the runner_task.