Good article on how to use an Teensy to plug into a USB port of a computer and hack it. What the authors didn’t mention is that Arduinos can get really finicky around acting as a USB HID device. Or at least the did 6 months ago when I was playing around with it.
http://hackaday.com/2015/01/27/using-hid-tricks-to-drop-malicious-files/
http://www.labofapenetrationtester.com/2015/01/dropping-weaponized-files-using-hid.html