Skip to content

ping2A/BadUSBPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BadUSBPy

This is an experimental project to have a generic BadUSB + CircuitPython version that allow you to maximize the fun (and your work ?) with all CircuitPython boards supported, like Raspberry Pico (1/2), ESP32, etc

The basic features supported are:

  • Emulate HID Keyboard/Mouse to perform any actions related to these devices
  • Multi Keycode injection
  • Rubber Ducky syntax supported (damned it is some Basic !), by using the PyBasic project with some modification to add new tokens, so you have the full syntax of Basic and more
  • Anti detection related to the name of the vendor (VID, PID), USB storage label etc
  • PowerShell Obfuscation support
  • Works by default on all CircuitPython device with USB support
  • Full Python and Open Source !

Hardware

Any board that support CircuitPython will work but the best right now are:

PicoUSB

Installation

You need to flash your device with CircuitPython in a first place, of course if it is supported. Next, when it is done, you need to copy all the src folder of this repository:

$ cp src/* /media/path/usb/CIRCUITPYTHON/

You can edit directly two files:

boot.py
code.py

boot.py file is executed in the first place when you plug your hardware, so it is possible to do things in this file, like changing the identify of the USB key, hide the USB storage etc

After that code.py file is executed and you can from here directly load some file, or use the API directly to perform action.

Commands

Commands available via the supported language (pybasic):

  • CLICK
  • CONTROL
  • ENTER
  • JITTER
  • HOLD
  • DELAY
  • MOVE
  • VOLUME
  • RELEASE
  • REM
  • SCROLL
  • STRING
  • STRINGLN
  • WAIT_FOR_BUTTON_PRESS

CONTROL

ENTER

API

Each command from the previous list is just a wrapper in the PyBasic lang, and is calling some API directly. So if you wish you can do it directly.

## Changing USB identities

The identify of the USB device can be change directly via the code directly in 'boot.py'.

Hide the USB storage

You can hide the USB storage by holding the 'mode' button during the boot of the key. Just release it in order to see the files again.

Scripts examples

In the examples folder you will find some funny and legit examples to start:

Enjoy, modify it and of course plug it !

About

BadUSB Python version !

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages