Solved

IP packet sniffer in C++ with Windows NT??? Any hints, source code???

Posted on 2001-08-09
4
1,243 Views
Last Modified: 2013-12-03
Hi,

I would like to build a simple IP packet sniffer (like those under Solaris --snoop) in C++.
So far I have seen this done only with W2K...

Does any one of you know of a place where I can get sample source code to start my
coding? I'd simply would like to sort by IP address To the From ;-)

So I need to be able to
1) sense the "wire"
2) read from it
3) open a packet
4) retrieve the from and to ip address

how can this be done using NT api???
0
Comment
Question by:aquila98
  • 2
  • 2
4 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6369834
0
 
LVL 2

Author Comment

by:aquila98
ID: 6372085
Interesting this rawether!

But I was really hoping to learn HOW to do it myself as opposed to just buying a
software...

Yet, this means that there IS a way to do it in NT, so that's good ;-) There is hope!!!

0
 
LVL 32

Accepted Solution

by:
jhance earned 150 total points
ID: 6372190
1) Read the information on www.rawether.net.  There is a lot of background information.

2) Get the DDK.  There is a sample NDIS intermediate driver there.  It's poorly done and poorly documented but it's all there is.

3) If you ONLY are interested in TCPIP, there is the WINSOCK 2 instrumented library.  It's not re-distributable but it does give you packet level access to the protocol.

4) Windows XP has full support for RAW adapter access.  It's somewhat controversial (See: http://grc.com/dos/xplaughter.htm) but my opinion is that those who want to wreak havoc can ALREADY do so.  Any capabilities in XP will be insignificant!!
0
 
LVL 2

Author Comment

by:aquila98
ID: 6379589
It seems to work...

Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now