Modify packets

Home Forums Discussions Support Portal Modify packets

This topic contains 6 replies, has 2 voices, and was last updated by  youcef04.ini 10 years, 2 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #5117

    youcef04.ini
    Participant

    Hello,

    I’m analyzing the possibilities for modifying IP packets on the Windows XP platform.

    I want my application to:
    1) Retrieve all TCP/IP packets.
    2) Modify their payload (by compression).
    3) Deliver them to their originally intended destination.

    This should happen in a way transparent to the application layer.

    I’m currently experimenting with WinpkFilter Framework for this purpose, but as the WinpkFilter only operates on data link layer for receiving / sending packets, it is getting a bit complicated.

    Are there a convenient tool / library / interface to retrieve, modify and deliver (transparently to the application) all packets on the network layer (i.e., IP) or even transport layer (i.e., TCP)?

    Many thanks in advance for your suggestions,

    #6377

    Vadim Smirnov
    Moderator

    all packets on the network layer (i.e., IP)

    May be something like filter hook or firewall hook driver, I’m not sure if they deliver packet with or without Ethernet header . Basically I don’t see any problem with having Ethernet header for the packet like WinpkFilter does for implementing the solution you mentioned. IP packet follows Ethernet header, just make a 14 bytes offset.

    or even transport layer (i.e., TCP)

    You can create an LSP to operate on the winsock level or TDI level filter.

    #6378

    youcef04.ini
    Participant

    I do not use a network LAN Ethernet, but a network Wireless WAN, I can use winpkfilter in this case?.

    does winpkfilter recover the packets in the two directions (entering and outgoing)? because my work must recover the packets in the two directions.
    thanks.

    #6379

    Vadim Smirnov
    Moderator

    I do not use a network LAN Ethernet, but a network Wireless WAN, I can use winpkfilter in this case?.

    Yes of course.

    does winpkfilter recover the packets in the two directions (entering and outgoing)? because my work must recover the packets in the two directions.

    Yes, if you set driver filter mode as passthru sample does then you inspect filter both incoming and outgoing packets.

    #6380

    youcef04.ini
    Participant

    I am developing a network application in C# that allow to compress IP packets, for that I want to use the lib winpkfilter but I need a version of this lib in C#, does it exists? If it does not exist, what can I do?

    #6381

    Vadim Smirnov
    Moderator

    Using ndisapi.dll from C# is a bit trickier because you can’t pass managed memory to the driver directly. We have got some C# samples to include in the next WinpkFilter release, you can request pre-release preview of these samples by e-mailing support(at)ntkernel.com.

    #6382

    youcef04.ini
    Participant

    Hi,
    I sent an e-mail yesterday to: support()ntkernel.com for request the C# samples, but at the moment, I have received no response.
    I have 15 days to finish this work and I did not start yet, because I have just found this solution. Please, please, please, if you can give me these C# samples help me and advise me how I must do so that I can finish this works quickly. 🙁 🙁 🙁
    Many thanks in advance for your help.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.