Subject: Re: Preventative security features?
To: Dmitri Nikulin <setagllib@optusnet.com.au>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-security
Date: 01/06/2005 14:15:56
--6TrnltStXW4iwmi0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sorry for the blast from the past, I was clearing out old mail and found=20
this..

On Sat, Nov 13, 2004 at 07:55:32AM -0800, Jason Thorpe wrote:
>=20
> On Nov 13, 2004, at 1:23 AM, Dmitri Nikulin wrote:
>=20
> >Maybe just not enough, then :)
> >Is this fed from the high-quality random source? nmap didn't give up=20
> >all hope on it.
>=20
> I seem to recall that there was a paper published that mathematically=20
> analyzed the TCP ISS randomization of a few OSs, and that NetBSD's=20
> method was given high praise.

I have that paper, and not only was NetBSD's method rated best, OpenBSD=20
and FreeBSD's (taken from Open) actually was weakened.

If I remember right, the NetBSD method involves a linearly-increasing
constant, stepped for each new TCP connection, to which a random amount is=
=20
added. OpenBSD changed it so that the random amount was added in each new=
=20
connection, with the idea that more random is better.

The problem is the law of averages (or large numbers or whatever you like
to call it :-)). For _ANY_ random distribution, if you look at the
distribution of the average of a sample set (i.e. you add together N
samples of your random variable & divide by N. Then you repeat, and look
at the distribution of those answers), you will have a distribution with
less variation around its mean than had the original.  And as I recall,
the standard deviation is sqrt(N) smaller. So open 100 connections, and
it's a factor of ten easier to guess the numbers. Also, regardless of the=
=20
starting random process, the estimation of the average becomes Gaussian.=20
Since we hopefully start with a flat RNG, that'd be bad.

So we should be careful when we add "security" features from other OSs. We=
=20
could end up making ourselves weaker.

Take care,

Bill

--6TrnltStXW4iwmi0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFB3bibWz+3JHUci9cRAo2LAJ0SGaNK6javScBCy0NNRAEFRIOK2gCgjpV9
pDU8Fr4nm6/2bC8EegswJ5A=
=VPtg
-----END PGP SIGNATURE-----

--6TrnltStXW4iwmi0--