Author Topic: Can you suggest a better USB-sniffer for WindowsXP?  (Read 1910 times)

0 Members and 1 Guest are viewing this topic.

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Can you suggest a better USB-sniffer for WindowsXP?
« on: June 05, 2022, 10:01:22 am »
hi
I am reverse engineering a USB device that only works on Windows XP; the idea is to understand the protocol for creating a Linux program (C-only).

The USB talks via Endpoint, a number representing a source and sink for data, the device I am hacking talks to three different Endpoints, and it's a USB2 device, which also uses { control, Bulk } types of transfer mechanisms, each with varying characteristics.

The Isochronous transfer mechanism is not used, I need the USB sniffer to show this information clearly.

Code: [Select]
Packet#      EndPoint      transfer_mechanisms      data_len      data (hex)

I am currently using the program Sniffbin-v1.8, which is good on Windows-XP, but not exactly handy to be used.


I'm slowly making things work, the program is already able to correctly initialize the device - which hey? It's "first things first: wiggle your big toe, start small and work your way up!" (quote, "Kill Bill" movie) - but the current USB-Sniffer is making things uncomfortable -

s there anything better, guys? a want a better and sharper sword  :o :o :o
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline dave_k

  • Frequent Contributor
  • **
  • Posts: 285
  • Country: au
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #1 on: June 05, 2022, 10:04:36 am »
Wireshark with USBpcap
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #2 on: June 05, 2022, 11:28:04 am »
Wireshark with USBpcap

It's great on Linux, but it doesn't work properly on Windows
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #3 on: June 05, 2022, 11:30:57 am »
(I like Carcharodon Photoshopia sharks, my favorite shark  :o :o :o )
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline AndyBeez

  • Frequent Contributor
  • **
  • Posts: 856
  • Country: nu
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #4 on: June 05, 2022, 12:11:23 pm »
Wireshark XP is a bit ancient :(

I do not recall exactly how this is done but I've seen a Linux PC used as an inline hardware USB packet sniffer by connecting one of it's USB ports to the target device and another USB port to the 'host' PC. There's some dev/usb voodoo which makes the Linux PC 'transparent' to traffic - it is seen as a hub to the upstream PC and as the host to the USB device's endpoints. USB traffic is a pipeline that is captured on the Linux machine and 'sharked' later. But this might be a waste of time if the upstream driver is expecting a specific VID-PID combination.
 
The following users thanked this post: DiTBho

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #5 on: June 05, 2022, 08:19:43 pm »
I used SysNucleus USBTrace v2.x

it looks nice, and it shows packets exactly as I need. It costs 150 euro, not too much. Is the license node-locked to the PC or can I move to a second computer?  :-//

At the moment I need to use it on a Windows XP laptop only because the software I need to sniff only runs on Windows XP, and I would like to re-use the USBsniffer on my Windows10 laptop in the future.

The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
« Last Edit: June 05, 2022, 08:31:15 pm by oPossum »
 
The following users thanked this post: DiTBho

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #9 on: June 05, 2022, 08:59:24 pm »
https://github.com/SnoopWare/usbsnoop

Before opening this topic I had already tried it and I didn't work  :-//
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #10 on: June 05, 2022, 09:03:04 pm »
I am currently using this one (usbsnoop, v1.8), which somehow works, but it doesn't show packets like I need.

Too messy and too verbose logs
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #12 on: June 06, 2022, 01:43:53 am »
Another possible option: Run Linux or Win10 as host, then Windows XP inside Virtualbox with USB redirection.  Sniff USB packets using Wireshark on your host whilst operating the program on the WinXP guest.

WinXP guests run really fast in VMs on modern devices :)  Very little hassle.

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #13 on: June 06, 2022, 08:13:09 am »
It's listed.

I downloaded the package, it doesn't install saying the OS is not supported.
It seems like Windows XP SP3 isn't good enough for its taste :o :o :o
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #14 on: June 06, 2022, 08:20:47 am »
Windows XP inside Virtualbox with USB redirection

Umm, the USB device I have to smell is really bad.
It initially presents itself as VID: PID1 to get a large bit stream on an FPGA, then re-configures itself and re-presents itself as VID: PID2 for operations.

PID1 != PID2

This is exactly what makes VirtualBox crazy about USB redirection and I don't want to have any more problems.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #15 on: June 06, 2022, 08:58:26 am »
Ok, bought a license for SysNucleus USBTrace v2-something from a dude.
Paid only 20 euro for it. It's good enough for what I need to do.

Let's go hacking.

Thanks everyone  :-+
« Last Edit: June 06, 2022, 09:01:08 am by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2297
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #16 on: June 06, 2022, 10:13:14 am »
It initially presents itself as VID: PID1 to get a large bit stream on an FPGA, then re-configures itself and re-presents itself as VID: PID2 for operations.

PID1 != PID2

This is exactly what makes VirtualBox crazy about USB redirection and I don't want to have any more problems.

Sounds like a Cypress EZUSB device I rev eng'd. I seem to remember there was a setting in Virtualbox like 'always grab this usb device automatically' and once I had done that for both identities, it was usable. It also had a large FPGA bitstream download but that was after the Cypress device had enumerated on its second and final identity.
 
The following users thanked this post: Bassman59, DiTBho

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2297
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #17 on: June 06, 2022, 10:19:07 am »
I've used Eltima USB Analyzer and it was good, nice UI.
I see it lists XP as supported [Windows (32-bit and 64-bit): XP/2003/2008/], and has a 14 day free trial.

https://www.eltima.com/products/usb-port-monitor/
 
The following users thanked this post: DiTBho

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #18 on: June 06, 2022, 07:41:32 pm »
It's listed.

I downloaded the package, it doesn't install saying the OS is not supported.
It seems like Windows XP SP3 isn't good enough for its taste :o :o :o

OK, that's too bad. Maybe you could let them know.
I've used a sniffer years ago on Windows (that was Win 2000 I think), but I can't remember the name...
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #19 on: June 08, 2022, 09:28:34 am »
A problem I have at the moment it that I need to export things in a way I can automatically build C filled structures.

CVS? XML? Somehow they look better than exporting as HTML: o: o: o
Seriously, USBtrace exported to "log.html", which is about 35 Mb and Firefox crashed trying to open it.

USBtrace can be configured to export XML. This helps  :-+
 
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #20 on: June 08, 2022, 09:29:42 am »
I mean .XML + Python(XLM_parser) = C auto filled structures  ;D
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #21 on: June 09, 2022, 07:24:47 pm »
It initially presents itself as VID: PID1 to get a large bit stream on an FPGA, then re-configures itself and re-presents itself as VID: PID2 for operations.

PID1 != PID2

This is exactly what makes VirtualBox crazy about USB redirection and I don't want to have any more problems.

Sounds like a Cypress EZUSB device I rev eng'd. I seem to remember there was a setting in Virtualbox like 'always grab this usb device automatically' and once I had done that for both identities, it was usable. It also had a large FPGA bitstream download but that was after the Cypress device had enumerated on its second and final identity.

EZ-USB was famous (haha) for its "re-enumeration" feature, which did just what you describe. Why they thought that was important or useful remains a mystery.
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #22 on: June 09, 2022, 07:54:23 pm »
It initially presents itself as VID: PID1 to get a large bit stream on an FPGA, then re-configures itself and re-presents itself as VID: PID2 for operations.

PID1 != PID2

This is exactly what makes VirtualBox crazy about USB redirection and I don't want to have any more problems.

Sounds like a Cypress EZUSB device I rev eng'd. I seem to remember there was a setting in Virtualbox like 'always grab this usb device automatically' and once I had done that for both identities, it was usable. It also had a large FPGA bitstream download but that was after the Cypress device had enumerated on its second and final identity.

EZ-USB was famous (haha) for its "re-enumeration" feature, which did just what you describe. Why they thought that was important or useful remains a mystery.

They had some kind of USB bootloader allowing to download the firmware in internal RAM from the host, and then restart with the new firmware, which would typically reeunumerate as a different device.
While sometimes a bit annoying for the user, it was an early form of DFU not requiring "flashing" the device (it ran entirely from RAM) and making firmware updates as easy as providing a new driver. Devices built with that scheme could never get "bricked".
 

Online DiTBhoTopic starter

  • Super Contributor
  • ***
  • Posts: 3904
  • Country: gb
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #23 on: June 10, 2022, 07:19:47 am »
They had some kind of USB bootloader allowing to download the firmware in internal RAM from the host, and then restart with the new firmware, which would typically reeunumerate as a different device.
While sometimes a bit annoying for the user, it was an early form of DFU not requiring "flashing" the device (it ran entirely from RAM) and making firmware updates as easy as providing a new driver. Devices built with that scheme could never get "bricked".

Yup, you love it when you develop something, you hate it when you have to use a VM to hack something.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14440
  • Country: fr
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #24 on: June 10, 2022, 05:42:15 pm »
They had some kind of USB bootloader allowing to download the firmware in internal RAM from the host, and then restart with the new firmware, which would typically reeunumerate as a different device.
While sometimes a bit annoying for the user, it was an early form of DFU not requiring "flashing" the device (it ran entirely from RAM) and making firmware updates as easy as providing a new driver. Devices built with that scheme could never get "bricked".

Yup, you love it when you develop something, you hate it when you have to use a VM to hack something.

Yes.

Note that if using some MCU with enough RAM and capable of executing code from RAM (many would fit these days), that's something you can still do (and more elegantly), while I've seen it done relatively rarely, if the device you design is a USB device which isn't supposed to function when not connected to a host.

You can just implement a set of well tested base routines and put them in Flash, and then have most of the firmware downloaded from the host to the device in RAM through USB. Can be a very flexible scheme.
 
The following users thanked this post: DiTBho

Offline cgroen

  • Supporter
  • ****
  • Posts: 631
  • Country: dk
    • Carstens personal web
Re: Can you suggest a better USB-sniffer for WindowsXP?
« Reply #25 on: June 10, 2022, 05:50:11 pm »
I use the "Beagle 480" from totalphase:
https://www.totalphase.com/products/beagle-usb480/

worth every penny!
 
The following users thanked this post: DiTBho


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf