From owner-freebsd-questions@FreeBSD.ORG Sat Jan 3 12:45:25 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7A551065676 for ; Sat, 3 Jan 2009 12:45:25 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2082B8FC08 for ; Sat, 3 Jan 2009 12:45:24 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n03CjHnW049135; Sat, 3 Jan 2009 12:45:18 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk n03CjHnW049135 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1230986718; bh=qOClJN1AspXRHN IWyqnxDT0b6f7sMEQf2DxrkDM3cKg=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<495F5DD7.2070302@infracaninophile.co.uk>|Date:=20Sat,=2 003=20Jan=202009=2012:45:11=20+0000|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.18=20(X11/20081125)|MIME-Version:=201 .0|To:=20RW=20|CC:=20freebsd-questions@ freebsd.org|Subject:=20Re:=20Foiling=20MITM=20attacks=20on=20source =20and=20ports=20trees|References:=20<20090102164412.GA1258@phenom. cordula.ws>=09<495E4F24.80209@unsane.co.uk>=20<20090103013825.18910 bf5@gumby.homeunix.com>|In-Reply-To:=20<20090103013825.18910bf5@gum by.homeunix.com>|X-Enigmail-Version:=200.95.6|Content-Type:=20multi part/signed=3B=20micalg=3Dpgp-sha256=3B=0D=0A=20protocol=3D"applica tion/pgp-signature"=3B=0D=0A=20boundary=3D"------------enig193E7ECC 23B5DC2F05D6A9E6"; b=rckId/Tc+21Dn/0whx4Ug7Nvz2GaGY07Gd6CrwbG9NOQYd 09Zu/Fsl4/5RPfuM5iyfmMM2T2o5/sNR9hQbhlEpCLIwU0D+AaLel9mTpm97i6qIoeY AcRV237wFr9hWVkgN3LgavXw1J8f18RRzZAb7nVu0+2VrnHTMN1p9zFfgc= Message-ID: <495F5DD7.2070302@infracaninophile.co.uk> Date: Sat, 03 Jan 2009 12:45:11 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: RW References: <20090102164412.GA1258@phenom.cordula.ws> <495E4F24.80209@unsane.co.uk> <20090103013825.18910bf5@gumby.homeunix.com> In-Reply-To: <20090103013825.18910bf5@gumby.homeunix.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig193E7ECC23B5DC2F05D6A9E6" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Sat, 03 Jan 2009 12:45:18 +0000 (GMT) X-Virus-Scanned: ClamAV 0.94.2/8831/Sat Jan 3 04:21:55 2009 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Foiling MITM attacks on source and ports trees X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 12:45:27 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig193E7ECC23B5DC2F05D6A9E6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable RW wrote: > On Fri, 02 Jan 2009 17:30:12 +0000 > Vincent Hoffman wrote: >> Admittedly this doesn't give a file by file checksum >=20 > That's not really a problem, it's no easier to create a collision > in a .gz file than a patch file.=20 >=20 > The more substantial weakness is that the key is verified against a > hash stored on the original installation media. If someone went to the > trouble of diverting dns or routing to create a fake FreeBSD site they > would presumably make it self-consistent down to the ISO checksums. Yes. Anyone can generate checksums. The standard method of getting roun= d this problem is to cryptographically sign the (lists of) checksums using some form of public/private key pair. Unless designed carefully, there will be substantial logistical problems = to maintaining such lists of signatures. The least laborious mechanism I ca= n think of would be this: an SSL secured web site using a key+cert signed b= y a trusted CA[*]. This site would have privileged access to the master re= positories and would run a fairly simple CGI where supplying the location of a file = from a checked out copy of a repo, plus version number information and whateve= r else is necessary to uniquely identify the specific file in question woul= d be answered with a list of checksums (MD5, SHA1, SHA265 etc.) of that fil= e. Obviously, this will require substantial caching of previously calculated= checksums simply for performance. =20 As an end user, you check out sources etc. from whatever of the mirrors i= s most suitable. You can then verify the correctness of what's on your dis= k by comparing a locally generated checksum with what you can download via = a trusted channel from the checksum server. Since the checksum server is o= nly accessible via HTTPS and has a trusted certificate it should not be possi= ble to spoof. Traffic levels should be relatively small compared to the main= distribution channels. Even so, because of the SSL requirement it's goin= g to take a substantial piece of kit to provide this checksumming service at a= decent performance level, especially when there are recent new releases.= Cheers, Matthew [*] Buying a high security cert from the likes of Verisign or OpenSRS wou= ld set you back about =A3800 p.a. and it would probably be necessary to use = someone like the FreeBSD Foundation as an appropriate body to own the cert. --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig193E7ECC23B5DC2F05D6A9E6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAklfXd0ACgkQ8Mjk52CukIy1WgCfVO/dE3KyvDF/j6eAc3rjcNDv qpsAnRtUQzEss/man+vjdvMgWYfY8Icv =MoOL -----END PGP SIGNATURE----- --------------enig193E7ECC23B5DC2F05D6A9E6--