I suggest that you get a good book on TCP/IP networking that explains how
IPv4 and IPv6 network packets are formed, forwarded, fragmented, and
re-assembled. That same book will also explain how TCP uses IP and thus how
to ‘receive’ a flow of TCP packets and re-construct the TCP stream being
carried.
There are many such books out there. I am partial to “Internetworking with
TCP/IP” by Comer only because I have had it forever on my bookshelf. But I
understand that “TCP/IP Illustrated” by Stephens is also very good and may
be a better choice. My edition of the Comer books is, well, ancient
- I
have had them for 19 years. That is some serious “keeping books”.
The organization of the processing is basically a pipeline:
Receive IP packets -> Re-assemble into IP Datagrams containing TCP segments
-> buffer into a window on the TCP stream.
It is not a ‘driver’ problem, just a ‘network programming’ challenge.
Good Luck,
Dave Cattley
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Saturday, January 16, 2010 4:14 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Writing driver to intercept network communication
(IDS/IPS)
Ok, I’ll start this project one step at a time.
For now, I will go with NDIS IM filter that checks each packet for known
signatures and if it detects anything suspicious it’ll log the IP address
the port number, drop the packet, and inform some user mode GUI application.
This GUI application will warn the user of the event and it might try to
figure out what application is using that port number.
After that I’ll see about implementing something more advanced.
Thank you all for your suggestions, they’ve been very helpful.
Just one more thing. Since I am not experienced with network driver
programming.
Dave Cattley said:
“You might still find it simpler to keep the relatively small amount of
book-keeping required to re-assemble IP fragments and handle TCP stream
segments simpler than building a TDI filter.”
How complex is this “book-keeping” ?
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer