UDP数据包监视和在Windows筛选平台中的代理重定向期间获取应用程序路径。 [英] UDP Packet monitoring and getting app path during proxy redirection in Windows Filtering Platform.
问题描述
您好,
我想写一个驱动程序来捕获UDP数据包。然后使用WFP获取数据包有效负载或数据包的实际数据。
我是驱动程序开发和WFP的新手。我有2个问题:
I want to write a driver to capture the UDP packet's. Then to get the packet payload or actual data of packet using WFP. I am new to driver development and WFP. I have 2 question:
1。如何使用WFP获取数据包的数据包有效负载或实际数据。然后如何从驱动程序级别将其写入文件,或者我必须将其发送到用户空间以将其写入文件。
1. How to get to packet payload or actual data of the packet using WFP. Then how to write it to a file from driver level or i have to send it to user space for writing it to a file.
2。如何在通过我们的过滤器重定向应用程序时检索应用程序路径。
2. How to retrieve the app path while redirect an application through our filter.
您能否提供任何信息或如何处理这两件事世界粮食计划署?
Can you please provide me any information or how to these 2 things in WFP?
推荐答案
> 1。如何使用WFP获取数据包的数据包有效负载或实际数据。然后如何从驱动程序级别将其写入文件,或者我必须将其发送到用户空间以将其写入文件。
>1. How to get to packet payload or actual data of the packet using WFP. Then how to write it to a file from driver level or i have to send it to user space for writing it to a file.
您可以使用ALE_DATAGRAM_DATA层查看数据包中的数据包。内核或您可以使用ALE_CONNECT_REDIRECT将其重定向到用户模式。您可以使用ZwCreateFIle,ZwWriteFile和ZwClose从内核编写文件。
You can use the ALE_DATAGRAM_DATA layer to see the packet in the kernel or you can redirect it to usermode with ALE_CONNECT_REDIRECT. You can write a file from the kernel with ZwCreateFIle, ZwWriteFile and ZwClose.
> 2。如何在通过我们的过滤器重定向应用程序时检索应用程序路径。
>2. How to retrieve the app path while redirect an application through our filter.
应用程序路径存储在callout的回调的inFixedValues参数中。例如,在ALE_CONNECT_REDIRECT处,它存储在FWPS_FIELD_ALE_CONNECT_REDIRECT_V4_ALE_APP_ID中。
The app path is stored in the inFixedValues parameter of the callout's callback. For example, at ALE_CONNECT_REDIRECT it is stored in FWPS_FIELD_ALE_CONNECT_REDIRECT_V4_ALE_APP_ID.
J
这篇关于UDP数据包监视和在Windows筛选平台中的代理重定向期间获取应用程序路径。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!