A PowerShell script for converting other PowerShell scripts to USB Rubber Ducky payloads
Backup your script before running this
- Cleans up your PowerShell code using
Edit-DTWCleanScript
- Creates a seperate, minified version of your script using
minJS.psm1
(which can minify JavaScript and PowerShell) - Builds a Duckyscript that will quickly and discreetly (as possible) write your minified PowerShell script, save it, execute it, and delete it
- Uses
encoder.jar
to encode the Duckyscript to a USB Rubber Ducky payload namedinject.bin
To use your new payload, simply copy inject.bin
to a microSD card, and insert the card in the USB Rubber Ducky.
The generated payload is designed to work on Windows 7 or higher. Just plug it in.
- PowerShell 2+
- Java Runtime
psduck.ps1
is licensed under the Apache 2.0 license. Everything else in here are dependencies that were written by someone else who didn't include a license :
I'm using them under Fair Use, considering the authors released these files to the public for free.