-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BadUSB: Mouse control #4004
BadUSB: Mouse control #4004
Conversation
add mouse functions to BadUsbHidApi
removed mouse commands supporting get_mouse_keycode function added mouse buttons as Keys for HOLD function
i wanted to implement something like this for a while and had it on my todo list, happy to see its becoming a reality! great work! 💯 |
Thank you! |
Un-draft when ready and let me know if you need any help. |
I should be able to work on this soon. |
added to help with better readability
The hold and release functions have both been reworked to remove the bug preventing keyboard hold functionality. They should both be much more readable now also. I tried to keep it clear when working on Keyboard vs mouse keys. Updated Demo Video Demo Script Used``` ID 1234:abcd Generic:USB Keyboard REM Declare ourselves as a generic usb keyboard REM You can override this to use something else REM Check the `lsusb` command to know your own devices IDsDEFAULT_DELAY 200 STRING qwertyuiop DELAY 1000 REM Test all mouse functions DELAY 1000 MOUSEMOVE -10 0 DELAY 1000 MOUSESCROLL -50 DELAY 1000 REM Verify Mouse hold working DELAY 1000 REM Verify KB hold working ENTER |
* add usb hid mouse functions, add mouse functions to BadUsbHidApi * add ble mouse functionality * add hid_usb_mouse_release_all * ducky mouse command skeleton * implement mouse click functions * corrected missing semicolon * added mouse functionality * corrected mouse scroll functionality * mouse key functionality, removed mouse commands, supporting get_mouse_keycode function, added mouse buttons as Keys for HOLD function * add mouse commands * removed mouse middle click * Format sources and fix bunch of mistakes in nfc and subghz * added HID_MOUSE_NONE: added to help with better readability * added script for mouse movement test * Fix: hold and release, imrpove readability * simplified the mouse demo/test * Format sources Co-authored-by: あく <alleteam@gmail.com>
BadUSB: Mouse Control
I often found myself automating various functionality and wanting to be able to trigger a mouse click. This PR will add basic mouse functionality to the BadUSB App. Additionally this makes mouse movement more accessible for research on how this type of movement can be used in a security sensitive enviroment.
What's new
Several new mouse commands:
Documentation also updated to reflect the changes
Additionally I implemented functionality for the Middle click (often the mouse wheel button) but in my testing it seemed to only work some of the time.
Verification
I found the easiest way to visualize the mouse movements was to use minecraft as that will show the movements very easily. My script here includes the MIDDLECLICK function, but as you see that does not work yet. If I get some more time int he future I'll look into why that does not work as expected and create an PR for that.
I used the following BadUSB script:
A Short video of running this script:
https://youtu.be/hi02vP7v6do
Checklist (For Reviewer)