Hackers of India

Reverse Engineering RGB Keyboard Backlights With Linux Kernel Drivers

By  Rishit Bansal  on 23 Sep 2023 @ Nullcon


Presentation Material

Abstract

This talk revolves around a recent hobby open source project I undertook to reverse engineer a Windows HP Laptop RGB Keyboard driver and re-implement the same functionality on Linux by writing a kernel driver. Initially, I thought this would be straightforward, but I was proven wrong fast! Due to the lack of any unified interface for keyboard backlights, laptop manufacturers create their own proprietary firmware to interface these devices using obscure Windows APIs. The first phase of my talk explains how I reverse-engineered these APIs to understand how they work and what I learned in the process. A lot of the standards used here are not only applicable to Keyboard LEDs but all manufacturer-specific functionality in general. In this section of the talk, I aim to explain different reverse engineering techniques for dotnet / Windows native applications. The second phase of my talk describes about how I started contributing to the Linux kernel and submitted my first patch to the mainline 6.x Linux Kernel. It also talks about my ongoing work on Linux HP WMI drivers, where I am working with Kernel Maintainers to introduce new standards to hopefully unify RGB keyboard drivers on Linux: something which Windows was unable to do!