Re: Need Advice
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Sat, 5 Aug 2006 19:05:37 -0400
Anton,
I cannot argue with your analysis based on ease of use, but it should
be pointed out that Firewall-hook drivers are discouraged by Microsoft, and
Filter-hook drivers only allow one to be registered. So if the OP is
looking for a long term viable solution, he needs to think about option 1.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply
"anton bassov" <soviet_bloke@xxxxxxxxxxx> wrote in message
news:1154817617.350640.305830@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi mate
You have 2 options:
1. Write NDIS IM. This is quite complex thing, with around 95% of code
that is totally unrelated to your actual task - you would have to make
sure that your driver fully conforms to NDIS model. Furthermore, you
are more than likely to get into trouble with NDISWAN and virtual
adapters, so that you will have quite a few extra things to worry about
2. Write NDIS-hooking solution. This is easier, because you are able to
concentrate only on the part that indicates incoming packets to
protocol drivers (NdisXXXIndicateYYY()), or
just with protocols Receive() and ReceivePackets handlers()
When you go for option 2, you have to register do-nothing protocol
driver (just in order to get a valid protocol handle) and cast it to
NDIS_PROTOCOL_BLOCK structure. At this point you will be able to get
access to the whole chain of NDIS_PROTOCOL_BLOCK, NDIS_OPEN_BLOCK and
NDIS_MINIPORT_BLOCK structures, where you will be able to find
addresses of functions you want to patch.
I would recommend you to start with option 2, and to implement it not
as firewall but
just as packet analyzer that captures all packets, but does not do
anything else - you can add filtering capabilities to it at some later
stage.
Anton Bassov
euacela@xxxxxxxxx wrote:
hi man,
what would you recomand me to use in making an effective firewall.
Not a too fency one but just a simple one. For example what do
TinyPersonalFirewall uses or other firewalls. I don't thing they just
hook kernel mode functions.
Do they use NDIS ?
if you have better suggestions please .. .they are welcome . . . how
would you do a fireweall ?
anton bassov wrote:
That's the whole point. What you perceive as a lack of proper
documentation
is the proper documentation. The Windows DDK is the most complete and
authoritative source of information on the subject.
The above statement just shows Slava M. Usov's "expertize" on the
subject. If Slava
M.Usov had some brains, some analytical skills plus SoftIce debugger,
he would have known that even ndis.h is incomplete. For example, he
would have known that NDIS_OPEN_BLOCK structure that is declared in
ndis.h is just part of the one that is actually used by Windows
(although these "hidden" fields seem to be different for W2K and XP).
He would have known that NDIS "handles" that are accepted as
parameters and returned by NDIS functions are not handles but pointers,
and that these "handles" are not as opaque as official documentation
claims - he would have known which "handle" is a pointer to
NDIS_OPEN_BLOCK, which "handle" is a pointer to NDIS_MINIPORT_BLOCK and
which "handle" is a pointer to NDIS_PROTOCOL_BLOCK. At this point he
would understand that, in actuality,
NDIS is, probably, the most undocumented part of the OS.
This fully explains all his statements about "months and months of
learning" and his inquiries about a "genious" who is able to learn NDIS
in less than a month - he does not seem to understand that NDIS library
in itself is just a glue that holds network stack together
Anton Bassov
Slava M. Usov wrote:
<euacela@xxxxxxxxx> wrote in message
news:1154614602.586993.296550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am not a complete newbe but I do not have proper documentation.
That's the whole point. What you perceive as a lack of proper
documentation
is the proper documentation. The Windows DDK is the most complete and
authoritative source of information on the subject. Another important
source
is PCAUSA, which supplements the DDK in the advanced area, and there
is
hardly anything else.
S
.
- Follow-Ups:
- Re: Need Advice
- From: Slava M. Usov
- Re: Need Advice
- References:
- Need Advice
- From: euacela@xxxxxxxxx
- Re: Need Advice
- From: Slava M. Usov
- Re: Need Advice
- From: euacela@xxxxxxxxx
- Re: Need Advice
- From: Slava M. Usov
- Re: Need Advice
- From: anton bassov
- Re: Need Advice
- From: euacela@xxxxxxxxx
- Re: Need Advice
- From: anton bassov
- Need Advice
- Prev by Date: Re: pausing system clock
- Next by Date: Re: SetupDiGetClassDevs
- Previous by thread: Re: Need Advice
- Next by thread: Re: Need Advice
- Index(es):
Relevant Pages
|