All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Frischknecht <peter@empoweringsolutions.com>
To: "Pasi Kärkkäinen" <pasik@iki.fi>
Cc: netfilter@lists.netfilter.org
Subject: Re: Protecting against DoS
Date: 10 Jan 2004 20:50:50 -0500	[thread overview]
Message-ID: <1073785847.9615.487.camel@peterlaptop> (raw)
In-Reply-To: <20031210165306.GH17221@edu.joroinen.fi>

Hello,

I wanted to let you know that you are not alone.
We manage networks in apartment complexes.  Hundreds of students use
their computers simultaneously and we have always been able to deal with
DoS attacks.

The attack you described is identical to the one we have suffered since
sometime in September.  In short: it cannot be stopped.  But there are
many things you can do.

As you may have found in personal research, the worm has the following
characteristics:
1 - It is a Zombie.  Computers do NOT automatically start attacking web
sites.  They wait for an instruction from outside.
2 - The connection to the outside "master server" is done via IRC.
3 - The infected computer attacks 1 to a few web servers at a time. (we
have never seen more than 3).
4 - Completely random spoofed src addresses.
5 - The MAC address is (Thank You GOD) not being spoofed.
6 - The intensity of the attack deems the offending computer almost
useless during the attack.

It seemed from your description that your network was fairly small.
In order to save bandwidth, we implement a transparent caching
strategy.  So we redirect port 80 to the cache.  Guess what!!!  Our
caching server ends up the target of the attack!!!

I can tell you that I tried every pertinent module in the patch-o-matic
volume.  It was a 3 month ordeal with very frequent lockups. "connlimit"
does not work because once you enable SYN cookies, there are no
connections to limit.  "limit" draws too much CPU power, eventually
helping lock up the box.

Blocking the foreign IP sources at the FORWARD level (or INPUT in my
case) stopped the packets, but still kept my server with a very high
system use.

I have hundreds of rules in the MANGLE and NAT tables, so the bad
packets were still traveling and being matched against all those rules. 
I placed the drops for the foreign IPs in the MANGLE table.  If you look
at the docs, it is the first table the packet hits.

BTW, to stop foreign IP packets, I created one ACCEP rule for every
known IP class inside my network.  The last line simply DROPs everything
coming from the internal network.

My networks are basically functional now.  But the HIGH CPU use
persists.  It is likely caused by the interrupt handling or the packet
counters/rules checking.  I recently ran accross this page on lowering
the interrupt handling:
ftp://robur.slu.se/pub/Linux/net-development/NAPI/NAPI_HOWTO.txt

Feel free to correspond with me.  We can trade ideas on the topic.

Peter Frischknecht
Empowering Solutions, Inc.




  reply	other threads:[~2004-01-11  1:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-09 15:43 Protecting against DoS Pasi Kärkkäinen
2003-12-09 16:02 ` Michael Gale
2003-12-09 16:28   ` Pasi Kärkkäinen
2003-12-09 16:40     ` Michael Gale
2003-12-09 16:51       ` Pasi Kärkkäinen
2003-12-09 17:06         ` Michael Gale
2003-12-09 17:13           ` Pasi Kärkkäinen
2003-12-09 19:20             ` Geffrey Velásquez
2003-12-09 20:10               ` Arnt Karlsen
2003-12-10 16:53             ` Pasi Kärkkäinen
2004-01-11  1:50               ` Peter Frischknecht [this message]
2004-01-11  8:04                 ` bridge vlans in HP 2524 switch Computer Security
2004-01-26 10:45                 ` Protecting against DoS Pasi Kärkkäinen
  -- strict thread matches above, loose matches on Subject: below --
2003-12-09 19:11 Geffrey Velásquez
2003-12-09 18:01 ` John A. Sullivan III
2003-12-09 18:16   ` Ralf Spenneberg
2003-12-09 18:41     ` John A. Sullivan III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1073785847.9615.487.camel@peterlaptop \
    --to=peter@empoweringsolutions.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=pasik@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.