Vadim Smirnov

Forum Replies Created

Viewing 15 posts - 1,021 through 1,035 (of 1,496 total)
  • Author
    Posts
  • in reply to: what’s the time to release new version for winpkfilter #6482
    Vadim Smirnov
    Keymaster

      please,what’is the time for release the new version.

      I admit the 3.0.4 release was delayed several times already. However, this was done for the reason. Actually current 3.0.4 beta is already used by some customers and we are trying to take into the account their comments and suggestions. Once this process is completed (I hope it is already but better wait for the latest test reports) the new version will be available for public.

      If you are a licensed customer you also can participate in WinpkFilter beta.

      in reply to: IPTables Redirect NAT Support #6487
      Vadim Smirnov
      Keymaster

        Is it possible to get the same functionality (NAT redirect) as IPTables?

        It is possible to create NAT solution on top of WinpkFilter. An example, Internet Gateway http://www.ntkernel.com/w&p.php?id=31 is a simple NAT implementation based on WinpkFilter library.

        in reply to: Rules for interface filtering #6486
        Vadim Smirnov
        Keymaster

          TDI нужен только для контроля приложений, так что в TDI фильтре имеет смысл проверять можно ли приложению работать с сетью или нет (в расширенном варианте можно так же проверять на какой адрес приложение хочет создать соединение), а пакетную фильтрацию по IP/интерфейсу лучше организовывать на NDIS’е.

          in reply to: Shaping Howto #6485
          Vadim Smirnov
          Keymaster

            I believe that storing of packet information in the winpkfilter framework is unlikely as not releasing packet (as in passthru) is not informed back to the framework (like drop indication).

            You are right, WinpkFilter does not keep any references to the packet passed to you for the processing. In general your approach to making packet queues is ok.

            in reply to: what’s the time to release new version for winpkfilter #6479
            Vadim Smirnov
            Keymaster

              SendFlagTcpPacketToTcp(Lastpacket,Flag,fromip,toip,from port,toport);

              It would also need SEQ and ACK. Basically you can write such a function using the existing API completely in user mode.

              by the way,how to get the IFS HOOK like winpktilter(NDIS HOOK)?

              Create an IFS filter driver. There is a static IFS filter sample in the IFS kit (or in the latest WDK) names sfilter and dynamic IFS filter driver authored by Mark Russinovich used in Filemon. The source code for the last one was floating over the Internet, not the latest version but still.

              in reply to: what’s the time to release new version for winpkfilter #6477
              Vadim Smirnov
              Keymaster

                hope more fast~~~~~~

                It is ready but due to the reasonable amount of changes/extensions still needs more testing.

                deny ip in the ring0

                Yes, this is possible in 3.0.4

                send rst packet by one sub~~~

                Adding such a specific API would be an overhead because requires knowledge of current connection status (tracking all TCP sessions just to be able to send RST will affect perfomance), it is not a great problem to form RST packet in your code and then send it using WinpkFilter API if you need such functionality.

                in reply to: Aadapter associated packet queue checkup #6476
                Vadim Smirnov
                Keymaster

                  Баг? Или я что-то не понял?

                  Баг – громко сказано, никаких серьезных негативных последствий тут нет. Однако, с точки зрения производительности, ресетить event лучше после вычитывания пакетов из драйвера.

                  ЗЫ Надо будет поправить, чтобы вопросов не возникало…

                  in reply to: Aadapter associated packet queue checkup #6474
                  Vadim Smirnov
                  Keymaster

                    Интересно, как именно происходит проверка состояния очереди?
                    Может есть какой то отдельный поток, который в цикле просматривает состояние очереди, и если она не пуста – сигнализирует в режим юзера?

                    Когда драйвер перехватывает пакет, он его ставит в очередь и выставляет событие сигнализирующее, что очередь не пуста. User-mode поток ожидающий (WaitForSingleObject/WaitForMultipleObjects) на этом событии пробуждается ото сна и читает пакеты из очереди пока они не закончатся, затем ресетит событие и снова ждет на нем. В общем-то, пример passthru показывает как это делается.

                    Альтернатива – polling пакетов без использования событий (пробуем читать пакет, если чтение успешно, то вычитываем все пакеты пока не кончаться, если чтение неуспешно – засыпаем на какое-то время, пример packetsniffer), но на мой взгляд этот метод менее эффективен.

                    in reply to: loopback sniffer (не работает) #6473
                    Vadim Smirnov
                    Keymaster

                      Смотря что понимать под loopback пакетами. В контексте WinpkFilter под loopback пакетами понимаются пакеты, которые были посланы на реальный сетевой интерфейс и затем показаны (вызваны receive обработчики) локальным протоколам. Благодарая этому механизму, в частности, могут работать сетевые снифферы реализованные в форме протоколов, как например winpcap. Без этого механизма winpcap не смог бы увидеть пакеты уходящие в сеть от TCP/IP.

                      Совсем другая история с пакетами отправленными на локальные сетевые интерфейсы (на свой собственный адрес) или на localhost (127.XXX.XXX.XXX). Эти пакеты собсвенно никогда не доходят до NDIS, а обрабатываются внутри TCP/IP стека, так что увидеть их с помощью WinpkFilter не удасться. Они собсвенно и не принимают зачастую привычную форму сетевых пакетов. Однако сами данные перехватить действительно можно анпример при помощи TDI фильтра:

                      http://www.ntkernel.com/w&p.php?id=24
                      http://www.ntkernel.com/w&p.php?id=8

                      in reply to: SPI/DPI #6472
                      Vadim Smirnov
                      Keymaster

                        But what may happen in case a packet is twisted in a way ? For example wrong packet length or something like that. Can a twisted packet cause BSOD, for example ? (It is rather DPI than SPI I think).

                        WinpkFilter driver checks validity of buffers supplied by user, but it does not take care about the packet content. So you can send absolutely anything if modules below and above WinpkFilter accept this.

                        in reply to: hi,SerpentFly please come in:about send rawpacket #6468
                        Vadim Smirnov
                        Keymaster

                          good!hope the next version~can u give a release time?

                          It is expected in next couple of weeks.

                          byt the way. i did not send out a packet by winpkfilter. 3.0.4 need more Characteristic property for firewall secion.

                          I’m not sure I understand this statement. Could you clarify?

                          in reply to: SPI/DPI #6470
                          Vadim Smirnov
                          Keymaster

                            Does winpkt implement SPI and DPI in any way ?

                            Stateful Packet Inspection? WinpkFilter is a library which takes packet from kernel level and delivers to user mode where you can implement SPI, DPI or whatever you want. It does not implement packet inspection itself.

                            in reply to: hi,SerpentFly please come in:about send rawpacket #6466
                            Vadim Smirnov
                            Keymaster

                              how to constructre a RST packet can u give me a delphi example?
                              why it is will be failed for my operation?please give me a slight.~~ Smile

                              I’m sorry, but I’m not a Delphi expert. Though the easiest would be sending your RST packet to the network (in addition to sending to stack) and intercept it with Network Monitor or any other sniffer you prefer. This will help to discover any probelms you may have in forming the packet.

                              can we make up a hardware filterinfo in the ring0. to complete the drop packet by the ring0 driver not need event. i think this is a necessary for most pelple.it can be improve the performance of winpkfilter.

                              This is already implemented in WinpkFilter 3.0.4 and currently under testing.

                              in reply to: OLE hooking in Windows #6244
                              Vadim Smirnov
                              Keymaster

                                Some years ago I’ve been involved into pop-up windows blocker development (module to prevent undesired browser windows to be opened). In case of Internet Explorer the most usable approach is creating Browser Helper Object http://en.wikipedia.org/wiki/Browser_Helper_Object

                                According MSDN:

                                IWebBrowser2 Interface
                                Exposes methods that are implemented by the WebBrowser control (Microsoft ActiveX control) or implemented by an instance of the InternetExplorer application (OLE Automation).

                                So unless application uses ActiveX, you just get the instance of IE started, which loads BHO, which may prevent the page from being opened…

                                in reply to: Send Raw Packet. #6464
                                Vadim Smirnov
                                Keymaster

                                  need to be chechsum or is it will be do the checksum by the SendPacketToMstcp or SendPacketToAdapter?

                                  The sample above does not initialize IP header and above, it forms and sends a sample Ethernet frame filled with zeros. If you are creating real world IP/TCP/UDP packet then you have to properly initialize required headers and calculate checksums.

                                  by the way,if i want to close the connection,need i send send a rst packet to both MSTCP and Adapter?

                                  Depends from your task, in general it is enough to send RST packet to local stack, another peer will close connection by timeout. But of course you can send RST packets to both, local and remote peers.

                                Viewing 15 posts - 1,021 through 1,035 (of 1,496 total)