8
\$\begingroup\$

Let's say there is a USB stick that is specifically for storing dates or days or some kind of arbitrary data. In order to access the data you must have the software.

Is there any way to analyze the USB signals and make your own hardware to read the values on the flash drive? What methods exist for doing so?

\$\endgroup\$
0

7 Answers 7

7
\$\begingroup\$

Yes.

I have been very pleased with the software from HHD. I used the serial port monitor to do some heavy reverse engineering a few years back and the HHD software was well tailored for the work.

I dabbled with their USB sniffer version but never bought the full version. Back in the day there was a free trial version that was somewhat useful. They may still have it.

At any rate, I got in over my head with USB because I couldn't figure out how to make the "driver" in Windows. If you're using Linux the project may be quite a bit easier, since all of that low level driver I/O logic is easily accessible in the kernel code. Also, Linux 2.6 offers some devices under /dev which can be used to directly send/receive to the USB device without the need for any special module/drivers. Great for development.

\$\endgroup\$
2
  • \$\begingroup\$ I'm interested in doing some reverse engineering of the MSP430 launchpad dev board's usb communication under linux. Do you know where I could find some more information on the devices under /dev that I can directly communicate with? \$\endgroup\$
    – pfyon
    Commented Aug 27, 2010 at 16:35
  • 1
    \$\begingroup\$ I was researching the Linux user-space USB interface some time ago. (I ended up only programming for Windows and OS X) The only information I could find about the /proc interface was in the libusb library (it uses the interface) and the kernel sources itself (I don't remember the link or the filename anymore). \$\endgroup\$
    – jpc
    Commented Sep 5, 2010 at 1:29
4
\$\begingroup\$

Reverse engineering USB can be a challenge; there is a lot of data to sort through.

First, you have to understand the protocol; I found USB in a Nutshell to be pretty good.

Then you need some way of collecting the traffic and analyzing it. It requires at least some software, and possibly some hardware. I use a hardware USB analyzer at work, but they are expensive. I know it is possible to use Virtualbox and collect the USB traffic in Linux, but I've never done it. You can start with Virtual USB Analyzer.

\$\endgroup\$
1
  • \$\begingroup\$ I use an Ellisys USB analyzer every so often. When someone says "X device is expensive", the correct response is "Compared to what?" (In one recent case at work, I was told that something in my code wasn't working. It took me a couple of minutes with the Ellisys to prove that the problem was somewhere else, and most of that time was hooking things up to run the test.) \$\endgroup\$ Commented Dec 22, 2013 at 15:17
2
\$\begingroup\$

I think that you are refering to USB dongles used for software protection. They don't use standard USB HID or MASS STORAGE device classes, and usually implement their own protocol and provide their own PC side driver for communication with them. PC application usually asks them to correctly reply to sent crypted message, or they provide some critical info not existing in PC application, needed by application to work correctly. These messages can be sniffed, like anything else over USB, but beware since you might be walking on the edge. Educating yourself about USB is one thing, but publishing work that breaks software protection is not legal and will be prosecuted. Don't do it. I apologize if I misunderstood the question.

\$\endgroup\$
2
  • \$\begingroup\$ It's illegal in some countries, but not all. \$\endgroup\$
    – pfyon
    Commented Sep 14, 2010 at 23:16
  • \$\begingroup\$ Decoding the traffic won't be trivial anyway. \$\endgroup\$ Commented Dec 22, 2013 at 13:41
2
\$\begingroup\$

You can analyse USB traffic with Wireshark: http://wiki.wireshark.org/CaptureSetup/USB

Wireshark is free software, best known for its network analyzing capabilities, but since a little while it does USB sniffing too.

\$\endgroup\$
2
  • \$\begingroup\$ It's worth noting that the USB capture basically requires linux. You can capture windows USB traffic by running windows in a VM, on linux. \$\endgroup\$ Commented Mar 13, 2012 at 22:18
  • \$\begingroup\$ If you want a Windows USB sniffing solution, VMWare can log usb traffic with a windows Host, though you still have to have the actual usb device connected through to a VM. \$\endgroup\$ Commented Mar 13, 2012 at 22:19
2
\$\begingroup\$

Few famous hackers (who reverse engineered game consoles) are currently developing a tool to analyse USB protocol. It is called OpenVizsla. It is currently under development but soon will be completed. Its a complete open source project.

Check this link http://www.kickstarter.com/projects/bushing/openvizsla-open-source-usb-protocol-analyzer/posts

\$\endgroup\$
1
1
\$\begingroup\$

Adafruit has a tutorial on reverse engineering a USB device (Kinect) http://www.ladyada.net/learn/diykinect/

\$\endgroup\$
0
\$\begingroup\$

There are tons of software and hardware solutions. Capturing the data and analyzing is not a problem, however you need to understand what is in the USB stick. I have seen people developing USB Sticks with embedded processors and AES encryption. (Locally encrypted/decryption). Without knowing what exactly is this USB stick, it is tough to know what exactly you can learn from the traffic..

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.