Re: TCP Dump Filters
From: Crist J. Clark (cristjc@earthlink.net)Date: 12/24/01
- Previous message: Tian Ying-Ming: "experience on GrIDS-Graph Base Intrusion Detection System"
- In reply to: Stover, S.f.: "Re: TCP Dump Filters"
- Next in thread: Turner, Elliot: "RE: TCP Dump Filters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 24 Dec 2001 12:54:10 -0500 From: "Crist J. Clark" <cristjc@earthlink.net> To: "Stover, S.f." <sstover@enterasys.com>
On Fri, Dec 21, 2001 at 06:10:17PM -0500, Stover, S.f. wrote:
> True, but can you FILTER on the contents of the payload? That was the
> original question I believe. A man on TCPdump shows me that you can
> filter on all kinds of packet characteristics like port, IP (host &
> net), TCP flags, options, length, etc. etc., but not on whether or not
> there is a "GET /cgi-bin/phf" in the payload. If I'm correct, this
> would be a major drawback in the use of TCPdump as an IDS engine. If
> you can't filter packets on payload content, you can't write real
> filters for attack signatures (outside of aberrant packet
> characteristics). Anyone know for sure if TCPdump can do this?? Judy??
You _can_ but the manner in which you do it is very limited. Using
something like,
ip[40:3] = 0x474554
Should find "GET" 40 bytes into an IP packet (I forget if you can use
strings in tcpdump(1) expressions and the manpage does not say
specificially whether you can or cannot). Similarly, you could do
something like,
tcp[20:3] = 0x474554
To only look inside of the TCP segment.
The main limitation here being that you need to know _exactly_ where
to look for the data. Even in this simple example, we're in trouble
since TCP headers vary in length depending on the options being used.
-- "It's always funny until someone gets hurt. Then it's hilarious."Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org
- Previous message: Tian Ying-Ming: "experience on GrIDS-Graph Base Intrusion Detection System"
- In reply to: Stover, S.f.: "Re: TCP Dump Filters"
- Next in thread: Turner, Elliot: "RE: TCP Dump Filters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|