This was part of a research I was working on on USB HIDs and the potential security concerns regarding the same.
This C program detects Human Interface Devices (HID) on Windows and checks if the device has a specific Vendor ID and Product ID, indicative of a "Rubber Ducky." The code uses the SetupAPI to enumerate HID devices and opens each device to check its attributes.
- Windows operating system
- Compiler capable of building C programs (e.g., Visual Studio, MinGW, etc.)
- Windows API headers: windows.h, setupapi.h, devguid.h, regstr.h
- HID-specific header: hidsdi.h
- Clone the repository or download the source code.
- Open the project in your preferred C compiler environment.
- Ensure that the necessary dependencies are available in your compiler's include path.
- Build and run the program.
- Inspired by the need to detect specific HID devices such as "Rubber Ducky."
- Thanks to the Windows API for providing the necessary functions for device enumeration and interaction.