Send Notifications Directly to Your RGB Keyboard
This keyboard flashes a different color for alerts, which is done by using Windows VR, Wireshark, isolating LED commands, and HIDAPI.
Self-proclaimed security research hobbyist Cynthia Revstrom wanted a way to receive notification alerts while being hyper-focused or on break, which anyone could miss. The goal was to make her Ducky RGB keyboard flash a solid bright color that couldn’t possibly be ignored. The problem here is the Ducky board doesn’t have any support with her Linux system, so she turned to her friend who had previously shared a blog about writing userspace USB drivers for Linux, and used that information to get notification system up and running.
The first step was to configure a Windows 10 VM and install DuckyRGB to see what the application could do. Revstrom then used Wireshark to see what the Ducky software was doing in the Windows VM environment, and was able to discern the LED commands by targeting their hex color codes. She then wrote some userspace code to tie everything together. Unfortunately, the keyboard no longer functioned due to the tool she used to control the keyboard’s LEDs was claiming the device, so the original kernel driver no longer had access.
To get the keyboard back up and running, Revstrom tasked HIDAPI, which allows an application to interface with USB on Linux systems. After some tweaking, she was able to send data to the keyboard without claiming the device and was able to get it running again and successfully enable the notification alert function.
Revstrom has uploaded a detailed walkthrough of her keyboard notification application on her blog, for those interested in recreating her build.