HIDIR – Wireless Programmable HID
HIDIR (Human Interface Device Infrared Remote) is a USB HID Device that I and two of my classmates in college (Swaroop and Arjun) did for earning two credits in 6th Semester.This project kept me extremely busy due to which I am posting after a long gap of about 3 months.
Our main aim was to create a useful and portable device.We started looking at our daily life for some ideas.Here are the observations.
- While giving presentations and seminars in class,people always stand near their laptops to control their presentation slides.Sometimes they would request somebody else to do that.Either the speaker or somebody else always has to be near the laptop to control the presentation slides.
- While watching movies or videos on a desktop, the playback cannot be controlled using a remote like how it can be done with a DVD Player or a Media Center.In order to pause or increase the volume,one has to be near the computer
Solution – HIDIR (Pronounced as Hider).
Our project HIDIR solves the above problems.The objective of HIDIR is to convert Consumer Infrared signals to commands on a computer.HIDIR consists of two parts,the receiving circuit which is connected to the computer via USB and a Consumer Infrared Remote (TV or DVD Player Remote). Here I have used a Panasonic Car Audio Remote.
We built the circuit on a breadboard.(We will make the PCB soon).The receiving circuit consists of an Atmega8 microcontroller and a TSOP1738 IR Receiver.I used V-USB (A software only implementation of USB 1.1) to create a USB HID Keyboard.I started with the AVR USB Powerpoint Presenter.I modified the code and added virtual keyboard buffer.The keyboard buffer helps in sending strings and texts to computer.I interfaced the TSOP1738 and wrote the code for decoding the Remote’s IR Signals.The entire coding was done using c and avr-gcc was used to compile the code.I used USBasploader to program the microcontroller.
Currently I have programmed it to do the following
- Control video and audio playback in VLC Player
- Control Powerpoint Presentations
- Username and Password entry for Login
- Closing windows
- Running specific Applications
- Folder navigation.
More can be done using a bigger remote with more buttons.
Advantages of HIDIR
- Plug and Play USB Device
- Operating System Independent
- No external Power Supply required
- Low Cost Device
- Portable and Simple to operate
Penetration Testing with HIDIR!
Searching the internet,I found many articles,videos and links related to hacking and penetration testing using programmable HIDs. IronGeek.com has got an excellent article on Hacking and Penetration Testing using Teensy.It is called PHUKD(Programmable Hid keystroke Dongle).
The PHUKD library contains many interesting functions like running commands at the run bar in Windows etc.Many people have made their own libraries like running cmd with elevated priveleges etc.
This got me thinking and I successfully tried it with HIDIR.(I had to write my own custom libraries).I was able to add a hidden user account in Windows XP by just pressing a single button on my remote.
So another important application of HIDIR is Penetration Testing and Hacking with a IR Remote.
Those of you who are interested building your own HID devices need not worry.You don’t have to break your head over buying each and every component,building the circuit on the breadboard,getting the bootloader onto the microcontroller etc.
There are two easy to use development kits which you can order online and use.
This development kit contains Atmega microcontroller with inbuilt USB support.It is very cheap and has good documentation.Check http://www.pjrc.com/teensy/usb_keyboard.html for building your own HID keyboard using Teensy.
This development kit is based on V-USB.So it is basically a software only implementation of USB unlike Teensy.The circuit in this development kit is very similar to the circuit which I built on breadboard for HIDIR.This kit cheaper than Teensy and can be ordered online.
The reason why I did not use any of these kits is that I stay in Bangalore and shipping charges of these kits to my city are very high.So I decided to build my own circuit using a breadboard.
It was good experience building this project.I learnt a lot about Atmega microcontrollers, USB Communication Protocol and Infrared Remotes.