简体   繁体   English

拦截和修改USB数据包

[英]Intercept and modify USB packets

The project is as follows; 该项目如下:

I would like to create an application that will be able to see packets going to a USB device. 我想创建一个应用程序,它将能够查看发送到USB设备的数据包。 When a certain bit of data that is known is sent to the device, the returning data will be intercepted and modified before the application requesting it, gets it. 当已知的某个数据位发送到设备时,返回的数据将在应用程序请求它之前得到拦截和修改。 I have used a USB sniffer to see the packets being sent and I know exactly what bits need to be changed. 我使用USB嗅探器查看正在发送的数据包,并且我确切知道需要更改哪些位。 My two questions are; 我的两个问题是:

  1. Is this a possible software solution? 这是可能的软件解决方案吗?
  2. Will this have to be a hardware solution? 这一定是硬件解决方案吗?

Additional Information – 附加信息 -

  • The USB device uses a FTDI245R chip for communication. USB设备使用FTDI245R芯片进行通信。 I know the VID and PID of the device. 我知道设备的VID和PID。
  • I have experience programming in vb.net and C# but I have never done anything with USB 我有在vb.net和C#中编程的经验,但是我从未使用USB做任何事情
  • I would like the application to be able to have a number entered and changed to hex data and that is what would be sent to the device. 我希望该应用程序能够输入一个数字并将其更改为十六进制数据,然后将其发送到设备。 The number being entered would be changed frequently. 输入的号码将经常更改。

Any input is appreciated. 任何输入表示赞赏。

It sounds to me like you want an upper filter driver to the FTDI driver. 在我看来,您想要FTDI驱动程序使用更高的过滤器驱动程序。 I don't know what class or type of device you are using or if it has a vendor specific driver or not, but here is a sample that shows how to create an upper filter to a vendor specific driver . 我不知道您使用的设备的类或类型是什么,或者是否有供应商特定的驱动程序,但是这里有一个示例,显示了如何为供应商特定的驱动程序创建上层过滤器 This example uses the OSRUSBFX2 device and sample driver in the WDK, you'll want to change the code to work and interface with the FTDI driver instead. 本示例使用WDK中的OSRUSBFX2设备和示例驱动程序,您将需要更改代码以使其工作并与FTDI驱动程序接口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM