Pages: [1]   Go Down
Author Topic: Can I impersonate devices other than keyboard/mouse using Arduino Leonardo?  (Read 998 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm searching for a suitable card for my college project in network security,
and I would like to now whether it is possible to impersonate a USB device of my choice, other than a keyboard or mouse (a printer for instance), using the Arduino Leonardo card?
I looked at the source code from github, but couldn't figure out whether the card can accept self-written device classes, that are not the keyboard/mouse native classes which I saw in the source code, and if so, what are the unique parameters I need to provide in order to distinguish between the various usb devices.

Thanks in advance,
Max
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Another try.

It's very important for me.
Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6639
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's certainly possible to emulate most sorts of USB device. You would have to read about and understand USB protocol to work out how to emulate a particular one. Sorry I can't be more helpful, I've never done it myself.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

maxmor89, like you, I'm waiting for someone to write code for other USB devices.
As far as I know, anything can be emulated, but writing the code is too complicated for me.

What kind of devices did you think about ?

For example an usb flash drive is not very usefull. The EEPROM is very small, perhaps too small for a FAT file system. Using an SD shield with SD card is of little use, since the SD card itself can be removed and placed in a PC.

A game console already exists : http://arduino.cc/en/Main/ArduinoBoardEsplora
But I looks as if it emulates a keyboard and a mouse, and not a game console.

An audio in and out could be useful in a few situations.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Krodal,
I thought about a printer, or some similar device. I'm doing a project in network security, so I don't need the card to act as a REAL printer of course, but only the computer to recognize it as a printer, and load suitable drivers. After achieving this goal, I can continue to more complicated tasks with the "Fake printer".

I know everything can be emulted in theory, but I can't figure out whether there is an easy way to emulate devices other which implement protocol other than Human Interface Device.

Still hope someone here tried stuff in this direction.
Logged

Manchester NH
Offline Offline
Full Member
***
Karma: 1
Posts: 138
Like to build typing devices, and heard unicorns
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This an interesting question and I would go further to ask how difficult it would be to emulate multiple devices
lets say a keyboard and something that would be able to receive info i.e. "sense" whats going on the host computer.

maybe a scrip to give the arduino cues, like "hey the browser is open you can run macro1"
or give access to the clipboard, "highlight password, copy... thanks bud, nice password"

I've got a feeling that this is probably going down the rabbit hole in terms of feasibility
probably take a lot of code
Logged

Manchester NH
Offline Offline
Full Member
***
Karma: 1
Posts: 138
Like to build typing devices, and heard unicorns
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

oh... wait you could just swich back and forth between serial and keyboard for what I suggested
a lot move feasible, converting ascii sucks, but cues would be easy with a script 
forgive me for being so noobish
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could take a look at the V-USB library. This is an USB library for normal ATmega chips without a builtin USB controller. Everything should also be possible with the Leonardo.
http://www.obdev.at/products/vusb/index.html
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm attempting to do this w/ a Leonardo - there are two things you need to address:

1 - altering the values in the bootloader that identify it as a Leonardo, i.e. the Vendor ID and Product ID and some of the other info that goes along with this - in other words changing these values in the bootloader source code, recompiling and uploading to the Leonardo (this requires an programmer or another Arduino board)

2 - updating the code in the software that gets loaded when you load a new sketch, also to reflect the kind of device that you want it to appear as.

the code changes aren't too difficult, right now I'm stuck getting my rebuilt bootloader to work, but going to tackle it this weekend again
Logged

Pages: [1]   Go Up
Jump to: