From owner-freebsd-net Mon Apr 24 13:39:48 2000 Delivered-To: freebsd-net@freebsd.org Received: from field.videotron.net (field.videotron.net [205.151.222.108]) by hub.freebsd.org (Postfix) with ESMTP id 96ECC37BBD7 for ; Mon, 24 Apr 2000 13:39:43 -0700 (PDT) (envelope-from bmilekic@dsuper.net) Received: from modemcable009.62-201-24.mtl.mc.videotron.net ([24.201.62.9]) by field.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0FTJ00DM3FV2P2@field.videotron.net> for freebsd-net@FreeBSD.ORG; Mon, 24 Apr 2000 16:35:26 -0400 (EDT) Date: Mon, 24 Apr 2000 16:36:19 -0400 (EDT) From: Bosko Milekic Subject: Re: netkill - generic remote DoS attack In-reply-to: <200004242012.QAA46910@tuzik.lz.att.com> X-Sender: bmilekic@jehovah.technokratis.com To: stanislav shalunov Cc: freebsd-net@FreeBSD.ORG Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 24 Apr 2000, stanislav shalunov wrote: > While it's a noble goal to try to prevent local DoS attacks, it's > probably not really possible in Unix model (a virtual machine would > help). Given the argument of an already existing sockbuf limiting implementation, and the argument you've brought up above, then the conclusion that you have drawn seems justified. However, solutions must exist even in cases were configuration limits fail. The `daemon,' perhaps a misleading term, simply means in this case the it is to run as a so-called `kernel process,' like `bufdaemon,' for example. The layout that you've seen probably suffers from certain specific issues, but it nonetheless offers system-wide mbuf-exhaustion prevention for local processes. Limiting sockbuf space is great, but no matter to how low you may want to limit, enough [limited] offenders could eventually exhaust available resources -- this is primarily when the `daemon' is to be invoked. > > I think it'd make more sense to concentrate on remote attacks, and > limit oneself to AF_INET family. > > UDP is fine: We send it and forget about it. If we are short of any > resource, we drop it. > > An attack such as netkill requires protection of TCP stack that > amounts to killing TCP connections. Yes, this is exactly what makes things like this difficult. You want to implement something very flexible and reliable in-all-cases, but at the same time, you wan't to keep it clean and easily modifiable (as opposed to scattered all around the place). > > To make intelligent decisions, we need some information about > connections (queues, rtt, time of last packet from remote, etc.) > > TCP code has all the information for TCP packets. > > How easy would it be to look for it from a separate daemon? > How maintanable would it be? If something changes later, how easy > would it be to forget about the daemon? And since it'll only show > under attack, testing might not reveal such omission. > > Since something has to happen pretty fast when there's no mbuf space > for new connections or for growing send queues, it'd seem that kernel > itself might seem like a natural place for such action, no? As I said, the so-called `daemon' is a `kernel process,' and it runs in a kernel context with access to the kernel's global lists, and so on. Regardless, your point regarding speed in the case of remote-attacks is valid. This is specifically why I split the problem in two: (a) The local case; (b) The remote case. The approaches, as you've noticed, are entirely different. > I'm willing to provide input and to discuss what the system should do > in my opinion as long as the kernel is a black box. > > My expertise is insufficient to discuss placement of those actions in > particular places in kernel. > > --Stanislav > I'm glad that you've already commented as you have and hope that you'll find time to perhaps "take the dive" and implement (or assist in) points (b) and (a) above. I'm also curious to see what changes are to come (if any) to this area of the tree as an indirect consequence of the WC/BSDi merger. -Bosko -- Bosko Milekic * pages.infinit.net/bmilekic/index.html * www.technokratis.com bmilekic@dsuper.net * bmilekic@technokratis.com * b.milekic@marianopolis.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message