Reverse Engineering a USB Keyboard

2025-02-01 in electronics, reverse-engineering #usb #firmware #logic-analyzer

In this writeup I capture USB traffic from a generic keyboard, identify descriptors, and document the HID report format. Tools include a logic analyzer, Wireshark’s USB dissector, and usbmon on Linux. I conclude with a minimal Python script that reads key events via pyusb and prints scancodes.

sudo modprobe usbmon
sudo tshark -i usbmon1 -Y "usb.transfer_type == 0x01"