经过几天的努力,终于成功抓取并且分析出来了我的4G无线上网卡的Messagecontent,很高兴,和大家分享下
为了让3G4G上网卡、终端能够在Ubuntu下使用,互联网上的教程大概都是说要不在制造商网站下载linux下的驱动,要不用usb-modeswitch进行模式切换。可惜的是我用的这一款MF832S没有linux的驱动,于是我只能用usb-modeswitch来进行模式切换了
然而我查了一下由于这个设备比较新,连usb-modeswitch都没有它的资料,没办法,只能自己抓包了。由于网上没有详细的教程,这个过程中遇到了很多的坑,所以把我的经验写下来
我用的是win7x64不支持snifferUSB,我用的是Device Monitoring Studio 7.21,只有15天的试用期,不知道有没有破解版的,反正能用就行
选择Next connected device(就是下一个连接的设备),右键选择start monitoring(抓包)
视图选择只要选一个URB视图就可以了,当然你选一个RAW原始数据视图也可以。然后点击开始就会开始监视USB口,只要检测到第一个新连接的设备就会开始抓包
插上4G终端,就会抓到一系列的usb数据
所有的数据如下
点击(此处)折叠或打开
-
000000: PnP Event: Device Connected (UP), 01.09.2015 20:17:29.678 (1. Device: Unknown)
-
The USB device has just been connected to the system.
-
000001: Get Descriptor Request (DOWN), 01.09.2015 20:17:29.678 +0.0 (1. Device: Unknown)
-
Descriptor Type: Device
-
Descriptor Index: 0x0
-
Transfer Buffer Size: 0x12 bytes
-
000002: Control Transfer (UP), 01.09.2015 20:17:29.679 +0.001. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: Control Pipe
-
12 01 00 02 EF 02 01 40 D2 19 98 01 00 01 01 02 ....?.@??......0
-
03 02 0
-
Setup Packet
-
80 06 00 01 00 00 12 00 ?.......
-
Recipient: Device
-
Request Type: Standard
-
Direction: Device->Host
-
Request: 0x6 (GET_DESCRIPTOR)
-
Value: 0x100
-
Index: 0x0
-
Length: 0x12
-
000003: Get Descriptor Request (DOWN), 01.09.2015 20:17:29.679 +0.0 (1. Device: Unknown)
-
Descriptor Type: Configuration
-
Descriptor Index: 0x0
-
Transfer Buffer Size: 0x9 bytes
-
-
-
000004: Control Transfer (UP), 01.09.2015 20:17:29.680 +0.001. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: Control Pipe
-
09 02 20 00 01 01 00 A0 FA .. ....狕.
-
Setup Packet
-
80 06 00 02 00 00 09 00 ?.......
-
Recipient: Device
-
Request Type: Standard
-
Direction: Device->Host
-
Request: 0x6 (GET_DESCRIPTOR)
-
Value: 0x200
-
Index: 0x0
-
Length: 0x9
-
-
000005: Get Descriptor Request (DOWN), 01.09.2015 20:17:29.680 +0.0 (1. Device: Unknown)
-
Descriptor Type: Configuration
-
Descriptor Index: 0x0
-
Transfer Buffer Size: 0x20 bytes
-
-
-
000006: Control Transfer (UP), 01.09.2015 20:17:29.681 +0.001. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: Control Pipe
-
09 02 20 00 01 01 00 A0 FA 09 04 00 00 02 08 06 .. ....狕........
-
50 04 07 05 86 02 00 02 00 07 05 06 02 00 02 00 P...?...R.......
-
-
Setup Packet
-
80 06 00 02 00 00 20 00 ?..... .
-
Recipient: Device
-
Request Type: Standard
-
Direction: Device->Host
-
Request: 0x6 (GET_DESCRIPTOR)
-
Value: 0x200
-
Index: 0x0
-
Length: 0x20
-
000007: Select Configuration (DOWN), 01.09.2015 20:17:29.681 +0.0 (1. Device: Unknown)
-
Configuration Index: 1
-
-
000008: Select Configuration (UP), 01.09.2015 20:17:29.708 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Configuration Index: 1
-
Configuration Handle: 0x986b370
-
000009: Bulk or Interrupt Transfer (DOWN), 01.09.2015 20:17:29.710 +0.002 (1. Device: Unknown)
-
Pipe Handle: 0x9cc8f10 (Endpoint Address: 0x6)
-
Send 0x1f bytes to the device
-
55 53 42 43 00 00 00 00 24 00 00 00 80 00 06 12 USBC....$...?...
-
00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 ...$...........
-
-
000012: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.711 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0x24 bytes from the device
-
05 80 00 02 1F 00 00 00 5A 54 45 00 00 00 00 00 .?......ZTE.....
-
43 44 52 4F 4D 00 00 00 00 00 00 00 00 00 00 00 CDROM...........
-
31 2E 30 00 1.0.
-
-
000014: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.711 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0xd bytes from the device
-
55 53 42 53 00 00 00 00 00 00 00 00 00 USBS.........
-
-
000015: Bulk or Interrupt Transfer (DOWN), 01.09.2015 20:17:29.711 +0.0 (1. Device: Unknown)
-
Pipe Handle: 0x9cc8f10 (Endpoint Address: 0x6)
-
Send 0x1f bytes to the device
-
55 53 42 43 01 00 00 00 00 00 00 00 00 00 06 00 USBC............
-
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ...............
-
-
000018: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.712 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0xd bytes from the device
-
55 53 42 53 01 00 00 00 00 00 00 00 01 USBS.........
-
-
000019: Bulk or Interrupt Transfer (DOWN), 01.09.2015 20:17:29.719 +0.007 (1. Device: Unknown)
-
Pipe Handle: 0x9cc8f10 (Endpoint Address: 0x6)
-
Send 0x1f bytes to the device
-
55 53 42 43 03 00 00 00 12 00 00 00 80 00 0C 03 USBC........?...
-
00 00 00 12 00 00 00 00 00 00 00 00 00 00 00 ...............
-
-
000022: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.723 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0x12 bytes from the device
-
70 00 06 00 00 00 00 0A 00 00 00 00 28 00 00 00 p...........(...
-
00 00 ..
-
-
000024: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.723 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0xd bytes from the device
-
55 53 42 53 03 00 00 00 00 00 00 00 00 USBS.........
-
-
000025: Bulk or Interrupt Transfer (DOWN), 01.09.2015 20:17:29.724 +0.001 (1. Device: Unknown)
-
Pipe Handle: 0x9cc8f10 (Endpoint Address: 0x6)
-
Send 0x1f bytes to the device
-
55 53 42 43 02 00 00 00 00 00 00 00 00 00 06 1B USBC............
-
00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ...............
-
-
000028: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.724 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0xd bytes from the device
-
55 53 42 53 02 00 00 00 00 00 00 00 00 USBS.........
-
-
000029: PnP Event: Surprise Removal (UP), 01.09.2015 20:17:29.850 +0.126 (1. Device: Unknown)
-
The USB device has just been disconnected from the system.
-
-
000030: PnP Event: Device Disconnected (UP), 01.09.2015 20:17:29.856 +0.006 (1. Device: Unknown)
-
The USB device has just been removed from the system, all drivers unloaded.
我们着重分析55 53 42 43 开头的31字节的数据,我们知道这就是messagecontent的内容(就是以ANSCII码"USBC"开头的数据)。然而问题是怎么这么多的USBC开头的数据,究竟哪个是
-
)
-
Pipe Handle: 0x9cc8f10 (Endpoint Address: 0x6)
-
Send 0x1f bytes to the device
-
55 53 42 43 00 00 00 00 24 00 00 00 80 00 06 12 USBC....$...?...
-
00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 ...$...........
-
000012: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.711 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0x24 bytes from the device
-
05 80 00 02 1F 00 00 00 5A 54 45 00 00 00 00 00 .?......ZTE.....
-
43 44 52 4F 4D 00 00 00 00 00 00 00 00 00 00 00 CDROM...........
-
31 2E 30 00 1.0.
-
000014: Bulk or Interrupt Transfer (UP), 01.09.2015 20:17:29.711 +0.0. (1. Device: Unknown) Status: 0x00000000
-
Pipe Handle: 0x9cc8ef0 (Endpoint Address: 0x86)
-
Get 0xd bytes from the device
-
55 53 42 53 00 00 00 00 00 00 00 00 00 USBS.........
-
-
000015: Bulk or Interrupt Transfer (DOWN), 01.09.2015 20:17:29.711 +0.0 (1. Device: Unknown)
应该是最后一个USBC才是真正的messagecontent,我猜的。
前几个messagecontent可能是网卡驱动做的几次尝试,因为我们知道一款驱动软件往往支持好几个3G终端的硬件型号,它也不知道插上来的是哪个型号的终端,于是就一个一个试,那么应该就是
55 53 42 43 02 00 00 00 00 00 00 00 00 00 06 1B USBC............
00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ...............
这个就是真的messagecontent了,放到ubuntu下的usb-modeswitch下试了试
把TargetVerderID,
TargetProductID和messagecontent加入到/etc/usb-modeswitch.conf下
点击(此处)折叠或打开
-
sudo usb_modeswitch -W -c /etc/usb_modeswitch.conf -I
就会发现3G终端模式已经成功转化了!
然后自然就是登陆usb-modeswitch的论坛,告诉大家这个喜讯了
阅读(4855) | 评论(0) | 转发(0) |