Vadim Smirnov

Forum Replies Created

Viewing 15 posts - 1,411 through 1,425 (of 1,478 total)
  • Author
    Posts
  • in reply to: tunnel mode not dropping packets? #5614
    Vadim Smirnov
    Keymaster

      I have the only idea, probably you filter the adapter different from the one used for the e-mail and network browsing.

      in reply to: Need to know what application is associated with a packet #5477
      Vadim Smirnov
      Keymaster

        There may be 2 application which are accessing same IP/ port/ protocol like Netscape and Internet explorer accessing yahoo.com same time.

        Right, destination IP/protocol/port can be the same, but source ports will be different for the case described.

        in reply to: NAT question #5607
        Vadim Smirnov
        Keymaster

          IMHO, in theory (hardly likely that it will ever happen in real life) it is possible that application running on NAT system access the same IP/port as another application running behind the NAT and the same source port used in NAT table and for local application running on NAT system. In this case it is not possible to distinguish if packet should be NAT’ed or not. But even in this rare case you still can use sequence and aknowledgement fields in TCP header to determine wheather the NAT should be applied (it will work for TCP connection only).

          in reply to: Need to know what application is associated with a packet #5475
          Vadim Smirnov
          Keymaster

            You can use IP/port/protocol information gathered on the TDI level and match it against information extracted from IP packet. If it is the same then the packet is probably originated from the application you intercepted on the TDI level.

            in reply to: Can winpkfilter work properly with win XP SP2? #5609
            Vadim Smirnov
            Keymaster

              The latest WinpkFilter release is fully compatible with Windows XP SP2.

              in reply to: NAT question #5605
              Vadim Smirnov
              Keymaster

                So what about if some application use this port number at the NAT computer? Is there any conflicts if use same port number ( with some application at NAT computer )?

                The conflict is possible, you will just bypass those applications (they may be not working properly with your NAT application, but it won’t make any problems to NAT). However, you can just reserve required port range by your own application.

                Another question: how to get binding IP address for each interface adapter, and how to get windows route table?

                IP Helper API

                in reply to: NAT question #5603
                Vadim Smirnov
                Keymaster

                  When I replace the Client(IP, PORT) of the inner packet with the NAT External(ip, port), what port number should I used for the NAT external? The same with the Client Port or a new one? Is that must be a free number that no one uses it? How do I generate this port number.

                  When you substitute inner source IP with external one but don’t substitute inner port this is called static NAT. When you substitute inner source port in addition to IP this is called dynamic NAT. You can use any free port number (an example just take some rarely used port range like 10000-64000 and allocate ports from there).

                  PS: where can I get the code of Checksum Calculation?

                  That depends from the progarmming environment you use, an example some C and Delhi code is available on this board.

                  in reply to: NAT question #5601
                  Vadim Smirnov
                  Keymaster

                    If you want to realize your own packet forwarding you can do it with API’s you have mentioned. If you filter two adapters and you can read packet from one and send them to another, here is no crime. Just don’t forget that MTU for the interfaces can be different.

                    in reply to: address translation #5547
                    Vadim Smirnov
                    Keymaster

                      One of the approaches (the easiest from my point of view) is filtering Server(WAN) interface substituting the original IP (if it is from LAN) in the outgoing packet with Server WAN card IP (port substitution also should be done in order to perform backward mapping). For incoming packets on the Server (WAN) interface you should match against NAT table and perform the reversed operation. Please note that packet forwarding should be enabled on the Server. You don’t need to route packets youself, TCP/IP will do it for you.

                      in reply to: kernel mode = yes, Application mode = ? #5600
                      Vadim Smirnov
                      Keymaster

                        What environment do you use for the development? There is a C header file iphlp.h which has some sample protocol header definitions (IP header, TCP header, UDP header and etc…). If you are using Delphi then you can use the ones below:

                        TIPHeaderPtr = ^TIPHeader;
                        TIPHeader = packed record
                        VerLen: Byte; //HL
                        TOS: Byte;
                        TotalLen: Word;
                        Identifer: Word;
                        FragOffsets: Word;
                        TTL: Byte;
                        Protocol: Byte;
                        CheckSum: Word;
                        SourceIp: DWORD;
                        DestIp: DWORD;
                        // Options: DWORD;
                        end;

                        TTCPHeaderPtr = ^TTCPHeader;
                        TTCPHeader = packed record
                        SourcePort:Word;
                        DestPort:Word;
                        SequenceNumber:DWord;
                        AcknowledgementNumber:DWord;
                        Offset:Byte; //only left 4 bits. Header length in 32-bit segments
                        Flags:Byte;
                        Window:Word;
                        Checksum:Word; //includes speudo header instead of TCP header.
                        UrgentPointer:Word;
                        end;

                        pTCPData: PChar;

                        And probably it makes sense for you to look at this topic:
                        http://ntkernel.com/forum/viewtopic.php?t=114

                        We are trying to provide as good support as we can 🙄

                        in reply to: kernel mode = yes, Application mode = ? #5598
                        Vadim Smirnov
                        Keymaster

                          Is it possible to use both packet level and application level filtering with in the same program ie. inspect packet using winPKfilter then a LSP/TDI filter?

                          Yes, sure.

                          Does your company provide a application level filter?

                          We provide localhost monitor API, which is TDI filter for Windows NT/2000/XP/2003. LSP sample is avalaible as a part of MSDN. Simple TDI filter for Windows 9x can be found in the VTOOLSD samples (from Compuware).

                          in reply to: kernel mode = yes, Application mode = ? #5596
                          Vadim Smirnov
                          Keymaster

                            WinpkFilter allows you implementing packet filtering technologies in both user or kernel mode (the one you choose depends from your expirience and requirements). But this is packet level filtering (it is not possible to determine application context on the NDIS level). For application level filtering you would need LSP or TDI filter.

                            in reply to: WinpkFilter news/updates. #5501
                            Vadim Smirnov
                            Keymaster

                              Visual Basic samples for WinpkFilter 2.4 released. You can download it from WinpkFilter product homepage.

                              in reply to: Multiple Adapters… #5595
                              Vadim Smirnov
                              Keymaster

                                1. How can I use WinpkFilter for capturing packets from multiple adapters ?

                                You can start the dedicated thread for each network interface to capture and process packets from it, just like PassThru sample does. Another way is setting up events for each interface and using WaitForMultipleObjects.

                                2. Dose my WinpkFilter Appication NOT conflict with any other NDIS hooking drivers or WinpkFilter Applications ?

                                We can’t guarantee the compatibility with any other hooking drivers, but WinpkFilter is compatible with the majority of firewalls on the market. In order to avoid conflicts with other WinpkFilter applications you would need the custom build (with customized names for drivers and devices) of WinpkFilter drivers (free for the Developer license).

                                in reply to: A question for a networking guru……….. #5594
                                Vadim Smirnov
                                Keymaster

                                  LSP is user mode solution, but TDI is kernel one. So, LSP is much more easier way. I don’t think that you should intercept clients who work with TDI directly, so probably LSP fits you.

                                Viewing 15 posts - 1,411 through 1,425 (of 1,478 total)