Pandora Is the Pandora capable of emulating a USB HID device? (Yes!)


Darkknight512

Active Member
Joined
Sep 7, 2010
Messages
637
Age
30
Location
Canada
Hey I am wondering if the USB slave port is capable of pretending to be USB HID such as a keyboard or mouse; a while back the people at hak5.org has created the USB "rubber ducky" it pretends to be a keyboard and types commands very quickly into a system, exploiting the fact that the system trusts the keyboard.


They are so far able to write a vb file in the console and a ascii file then excecute the vb code to turn the ascii file into an exe. Then they execute the EXE to create a remote shell accessible from another computer. They have a few other tricks made so far that is on their wiki.


They used a Atmel chip to do it but I am wondering if the Pandora is capable.


Of course all this for educational purposes, I do not intend to do harm with this knowledge.
 
Some discussion has been going on about this, and the general thought was: Technically possible, but not easy.


Let me see if i can find the thread


Edit: Hmm, i'm certain there was a thread much like this not that long ago. Can't find it though...
 
Last edited by a moderator:
Hi, So I was also interested in this, had a little go, but only got as far as the pandora being recognised as a USB keyboard, which is a start, I guess.


sudo modprobe gadgetfs


sudo mkdir /dev/gadget


sudo mount -t gadgetfs gadgetfs /dev/gadget


Then compiled this after making a little change


http://hid-gadgetfs....tree;f=keyboard


change dummy_udc to musb_hdrc


sudo make


then run


sudo ./gadgetfs-test


Some stuff in newer kernels looks promising:


http://lxr.free-elec.../gadget/f_hid.c


http://peter.korsgaa...driver-v2.patch
 
Last edited by a moderator:
I was searching for this and could only find this topic. I couldn't find anything already made, so I decided to make something. I have a ps3 controller emulated using gadgetfs. I plan on adding a few other things such as keyboard, mouse, etc. I am going to clean the code up and separate the controllers into plugins. Finally, I plan on packaging this up as a PND for general use.
 
Awesome I look forward to this. It would be nice to plug into my ps2 when doing things there without having to dig out and manage a big keyboard. Some other uses as well, like with my tablets and phones.
 
Last edited by a moderator:
Wow, that would be awesome extension of Pandoras versatility. I used to use old Palm PDA this way via bluetooth, that was about ten years ago. Since then I wished countless times my devices could do the same and now it looks like the best device of all could do the same. Keep this project up!
 
I was searching for this and could only find this topic. I couldn't find anything already made, so I decided to make something. I have a ps3 controller emulated using gadgetfs. I plan on adding a few other things such as keyboard, mouse, etc. I am going to clean the code up and separate the controllers into plugins. Finally, I plan on packaging this up as a PND for general use.

I am hereby declaring your idea interesting.
 
Additional update: I am going to implement it internally as a hub. My reason for doing that is so multiple devices can be loaded at one time. For example, mouse & keyboard, controller & keyboard, etc. I am also wanting to make it have the ability to "connect" from the host USB port to the virtual hub. The previous mainly for systems with a low number of USB ports, but I can see other potential uses. However, my Pandora host USB port stopped working some time ago. Therefore, when I arrive at this point, I will need some beta testers, preferably with both of the USB ports working.
 
Last edited by a moderator:
This sounds cool!


I had problems getting gadgetfs working on the latest firmware, but I haven't tried for a while. It was working fine on older kernels. I've previously attempted to recompile the g_hid kernel module, but never managed to get it working properly, had less time and gave up. I used suggestions from this site: http://www.linuxquestions.org/questions/linux-newbie-8/linux-usb-gadget-hid-driver-problem-840733/


Good luck with this, keep us updated!


As far as the OP goes, I was attempting to get g_hid loaded with the aim of using this script which seems to do what you are looking for : https://bitbucket.org/alxchk/hid/downloads
 

I already have the gadgetfs working. I still need to clean up the code. That is my main focus at the moment. Because that will make it easier to implement more plugins and features.


I then need a nice interface and some beta testers, not necessarily in that order.


I have finals coming up soon, so it may end up being about a month before I get a good general PND out. If anyone has recommendations for features, etc., now would be a perfect time to tell me. That way I can organize the code to reflect how the stable release should be.
 
I have a CC and a Giga Pandora.


This might be useful for testing.
I might call upon you sometime later to test it if you are willing.

Could this also work as a Bluetooth controller ?
I could probably add support for that later. The problem is that I don't have a bluetooth dongle.


I have a bluetooth dongle as well (and both of my Pandoras support bluetooth) :) .


Send me a PM if you need me.


I want to help here.


People were very surprised as I did some ICP magic during my presentation.


I want to see how they look like if I use my Pandora. Maybe one connected to the projector and one to use as external (bluetooth) keyboard :D .
 
Back
Top