Article View: comp.security.misc
Article #1139Re: Distinguishing Attempted Denial of Service Attack (DoS) or non-DoS
From: Lachlan Cranswick
Date: Thu, 12 Nov 1998 00:00
Date: Thu, 12 Nov 1998 00:00
72 lines
3309 bytes
3309 bytes
Thanks muchly for this - though this still leaves a few 100 lines of
ASCII paranoia from the original post to give further enjoyment
to the masses!
One query (which makes TCPDUMP more informative) - can the Perl
be modified so it puts a path-file_name (if applicable) next to each packet:
i.e.,
16:43:27.278348 sv1.http > 151.104.78.243.4883: . 1:1461(1460) ack 169 win
61320 (DF) /doobry/main.html
16:43:27.278463 sv1.http > 151.104.78.243.4883: . 1461:2921(1460) ack 169 win
61320 (DF) /doobry/main.html
Please forgive the Perl cluelessness. (Which US president wrote the above
mod though?)
Lachlan.
>Lachlan Cranswick wrote:
>> <snip>
>> PS: Brings up another query - is there a tool that could do a TCPDUMP
>> and also tell what files are being transferred as part of the status
>> line with respect to http?
>> <snip alot of reports not cleaned up...>
>You guys are killing me :] try this -
>#!/usr/bin/perl
>
>$LIMIT = shift || 5000000;
>
>$|=1;
>open (STDIN,"/usr/sbin/tcpdump -lnx -s 1024 dst port 80 |");
>while (<>) {
> if (/^\S/) {
> last unless $LIMIT--;
> while ($packet=~/(GET|POST|WWW-Authenticate|Authorization).+/g) {
> print "$client -> $host\t$&\n";
> }
> undef $client; undef $host; undef $packet;
> ($client,$host) = /(\d+\.\d+\.\d+\.\d+).+ > (\d+\.\d+\.\d+\.\d+)/
> if /P \d+:\d+\((\d+)\)/ && $1 > 0;
> }
> next unless $client && $host;
> s/\s+//;
> s/([0-9a-f]{2})\s?/chr(hex($1))/eg;
> tr/\x1F-\x7E\r\n//cd;
> $packet .= $_;
>}
>Lincoln wrote the above, but it's more or less public domain.
>Enjoy!
>-Sneex- :]
>________________________________________________________________________
>Bill Jones | FCCJ Webmaster | x3089 | http://webmaster.fccj.org:81
>------------------------------------------------------------------------
> __ _ RedHat 5.1 Manhatten
> / /(_)_ __ _ ___ __ http://www.apache.org
> / / | | '_ \| | | \ \/ / http://www.redhat.com
> / /__| | | | | |_| |> < http://www.perl.com
> \____/_|_| |_|\__,_/_/\_\ http://www.gimp.org
Lachlan M. D. Cranswick
Collaborative Computational Project No 14 (CCP14)
for Single Crystal and Powder Diffraction
Daresbury Laboratory, Warrington, WA4 4AD U.K
Tel: +44 (0)1925-603703 Fax: +44 (0)1925-603124 Room C14
E-mail: l.cranswick@dl.ac.uk
CCP14 Webpage (Under heavy construction):
http://www.ccp14.ac.uk
Technical Details
Message-ID:
<l.cranswick.210.0264FC0A@dl.ac.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<l.cranswick.209.01C47D5D@dl.ac.uk> <364A2D8B.A20EC1A@fccj.org>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10952f,d024781699c5dee3 X-Google-Attributes: gid10952f,public X-Google-Thread: ff723,d024781699c5dee3 X-Google-Attributes: gidff723,public X-Google-Thread: f8b34,d024781699c5dee3 X-Google-Attributes: gidf8b34,public X-Google-Thread: 1133d0,d024781699c5dee3 X-Google-Attributes: gid1133d0,public From: l.cranswick@dl.ac.uk (Lachlan Cranswick) Subject: Re: Distinguishing Attempted Denial of Service Attack (DoS) or non-DoS Date: 1998/11/12 Message-ID: <l.cranswick.210.0264FC0A@dl.ac.uk> X-Deja-AN: 410950173 References: <l.cranswick.209.01C47D5D@dl.ac.uk> <364A2D8B.A20EC1A@fccj.org> Organization: Daresbury Laboratory Newsgroups: comp.security.misc,cern.security.unix,comp.security.unix,comp.infosystems.www.servers.unix