Forum Replies Created
-
AuthorPosts
-
November 21, 2007 at 5:16 pm in reply to: what’s the time to release new version for winpkfilter #6482
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.
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.
TDI нужен только для контроля приложений, так что в TDI фильтре имеет смысл проверять можно ли приложению работать с сетью или нет (в расширенном варианте можно так же проверять на какой адрес приложение хочет создать соединение), а пакетную фильтрацию по IP/интерфейсу лучше организовывать на NDIS’е.
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.
November 9, 2007 at 3:09 pm in reply to: what’s the time to release new version for winpkfilter #6479SendFlagTcpPacketToTcp(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.
November 9, 2007 at 12:18 pm in reply to: what’s the time to release new version for winpkfilter #6477hope 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.
Баг? Или я что-то не понял?
Баг – громко сказано, никаких серьезных негативных последствий тут нет. Однако, с точки зрения производительности, ресетить event лучше после вычитывания пакетов из драйвера.
ЗЫ Надо будет поправить, чтобы вопросов не возникало…
Интересно, как именно происходит проверка состояния очереди?
Может есть какой то отдельный поток, который в цикле просматривает состояние очереди, и если она не пуста – сигнализирует в режим юзера?Когда драйвер перехватывает пакет, он его ставит в очередь и выставляет событие сигнализирующее, что очередь не пуста. User-mode поток ожидающий (WaitForSingleObject/WaitForMultipleObjects) на этом событии пробуждается ото сна и читает пакеты из очереди пока они не закончатся, затем ресетит событие и снова ждет на нем. В общем-то, пример passthru показывает как это делается.
Альтернатива – polling пакетов без использования событий (пробуем читать пакет, если чтение успешно, то вычитываем все пакеты пока не кончаться, если чтение неуспешно – засыпаем на какое-то время, пример packetsniffer), но на мой взгляд этот метод менее эффективен.
Смотря что понимать под 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=8But 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.
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?
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.
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.~~ SmileI’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.
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…
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.
-
AuthorPosts