5

Is it possible to use arduino uno r3 as USB keylogger by connecting the usb male pin to CPU and keybord cable to female USB pin of arduino. So that the keystrokes are stored in EEPROM. Without using an external storage modules or other components?

I am new to arduino, even suggestions are appreciated.

Thanks in advance.Somthing like this

Ganesh
  • 51
  • 1
  • 1
  • 3

3 Answers3

1

USB-host is hard if not impossible to implement on an UNO.

Though I believe most USB keyboards support PS2 as well (normally done with a USB-to-PS2 plug). So you should be able to talk to the keyboard using the PS2 protocol, which is a lot easier. There are libraries to do this for you.

Next you could use V-USB to emulate a keyboard to the PC. For that USB connection you need to add some resistors and zener diodes, to stay withing the usb specification. This is all explained on the V-USB website.

Using a different Arduino that has real USB support might be a better option. Also the UNO is rather large, so not that easy to hide.

Gerben
  • 11,332
  • 3
  • 22
  • 34
0

It is highly unlikely using an arduino uno r3.

USB Device: (To emulate a HID (Human Interface Device) Keyboard):

While there are Arduino libraries for emulating a keyboard, these will not work with the Uno R3. Instead, to make a Uno R3 act like a USB Keyboard Device, you need to reprogram the 2nd processor on the board and switch it from a USB Serial Device to a USB Keyboard Device. This is talked about in this stackexchange question.

USB Host (to talk to a USB Keyboard):

I do not believe there are any software solutions for emulating a USB Host on most Arduinos. Certainly not a Uno R3. A USB Host is a very complex software & hardware device. Instead, most Arduino projects use a USB Host Shield for this purpose.

st2000
  • 7,513
  • 2
  • 13
  • 19
-1

No, it's not. Or not with any degree of ease. The best you could hope for would be to intercept the USB data and try and decode it, but that really is beyond the ability of a lowly Arduino.

I have thousands of dollars worth of equipment aimed at doing that kind of thing - it's not a simple task.

Majenko
  • 105,851
  • 5
  • 82
  • 139