4 ms·
I've reverse engineered some protocols -- haven't done a USB one yet, but I'm sure the principals are similar. Grab some data, look at it (usually with a good
by Dav3xor 16y ago
I've reverse engineered some protocols -- haven't done a USB one yet, but I'm sure the principals are similar. Grab some data, look at it (usually with a good hex editor -- last time I used ghex2), look for patterns. Usually there's some sort of packet structure, or maybe some data that looks like something in ascii -- ghex2 shows you what every 2 bytes or 4 bytes are if they were signed/unsigned ints, floats etc. Usually something will jump out at you.
It's a fun game usually.
- temugen 16y agoAnd if you can actually input data using the protocol, you can take some standard packets and tweak a byte/short/long at a time and see what changes. Reversing USB is the same as any protocol on top of TCP is the same as any other protocol, just with different tools. I wish there were an open source hex editor like Hex Workshop for Windows - one of the features I loved was tagging a section of bytes with comments, and being able to use those same tags across multiple data dumps.
- hoggle 16y agoYou could write your own by extending OSS like hexdump or hexcurse or any other hex editor. It shouldn't be to big a deal to add that functionality. It's just beautiful what you can do with open source code! Don't forget to share.
- opello 16y agoParticularly handy for USB on Linux is the 'usbmon' module. Which when used with a kernel that has debugfs support, you can mount debugfs and use a new enough Wireshark to monitor the USB traffic. http://wiki.wireshark.org/CaptureSetup/USB http://wiki.wireshark.org/CaptureSetup/USB