Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

usb sniffing with wireshark

at the moment I am using usbmon to sniff usb. for better understandability I want to use wireshark. I've used wireshark before for sniffing ethernet packets. But what to capture to sniff USB Packets ? I meant I need to start by selecting which interface to capture in wireshark. but what wold I select there for usb ?

like image 815
Neel Basu Avatar asked Feb 11 '11 16:02

Neel Basu


People also ask

Can Wireshark sniff USB?

Wireshark can capture USB traffic, provided you fulfil the necessary requirements. When you start capturing USB traffic and then insert a USB stick, you'll see something like this: First we see a request (and response) for the device descriptor.

What is USB PCAP?

USBPcap is an open-source USB sniffer for Windows.


2 Answers

Grab newest wireshark. Use lsusb before and after plugin in device so You know which usb bus its plugged into.

type in terminal:

su -c "modprobe usbmon" && su -c "wireshark"

(First load kernel module that allow for usb sniffing for root, second load wireshark as root)

Than select usbmonX, where X stand for usb bus number (lsusb show those numbers).

After than you still need to filter packets for device / vendor id, or something else device specific, as wireshark will show all packets from all devices plugged into that bus. (Again lsusb before/after plugging you device will help).

like image 88
przemo_li Avatar answered Sep 17 '22 13:09

przemo_li


Have you taken a look at the documentation for that on the Wireshark website?

In libpcap 1.0.x, the devices for capturing on USB have the name usbn, where n is the number of the bus. In libpcap 1.1.0 and later, they have the name usbmonn.

like image 37
Miles Strombach Avatar answered Sep 20 '22 13:09

Miles Strombach