This project was done for my university thesis about Cybersecurity. We needed a tool to test our USB Firewall (built using USBProxy and a BeagleBone Black).
This tool is based on USBProxy (and needs a BeagleBone Black), but instead of waiting for a real device on the "slave port", it emulates an USB device, which is described by its Descriptors (located into the config
folder).
If you use a keyboard or a mouse, you can also make a script with some actions which will be ran when the fake device is connected and recognized by the host.
fakeusb -a keyboard -d keyboard
Will run the keyboard
script (located in the attack
folder) using a fake keyboard device.
Current available devices are:
keyboard
: emulates a keyboardmouse
: emulates a mousemultimedia
: emulates keyboard + mousemass-storage
: emulates a mass storage device
Available commands for attack scripts are:
- Keyboard
WRITE(EP) "string"
: writes the stringstring
as if it has beed typed on the keyboardPRESS_KEYS(EP) KEY1+KEY2+KEY3
: simulates a keyboard shortcut (max 3 chars) (ex. ALT+F4 or CTRL+ALT+CANC)
- Mouse
CLICK(EP) KEY
: simulates a click of the keyKEY
on the mouseMOVE(EP) X,Y
: moves the pointer toX
pixels horizontal andY
pixels verticalMOVE_AND_CLICK(EP) KEY X,Y
: simulates a drag & drop
- Generic
DELAY(EP) TIME
: waitsTIME
ms before sending the next command
EP
is the IN endpoint which we want to use to send our commands.
Those commands can be used only with keyboards or mice. You can find some examples in the attack
folder.
- You can see this tool in action in this video, while it tries to bypass our USB Firewall.
- More info about Design and Implementations can be found in my thesis chapter (in Italian): link.
- No, I won't do a documentation (in English) for this because I'm lazy.