Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1az55w-0005aI-O3 for pgsql-admin@arkaria.postgresql.org; Sat, 07 May 2016 16:28:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1az55w-00060n-5h for pgsql-admin@arkaria.postgresql.org; Sat, 07 May 2016 16:28:44 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1az55u-00060W-Fk for pgsql-admin@postgresql.org; Sat, 07 May 2016 16:28:42 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1az55r-0002Qy-JZ for pgsql-admin@postgresql.org; Sat, 07 May 2016 16:28:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u47GSbYx023282; Sat, 7 May 2016 12:28:37 -0400 From: Tom Lane To: Stephen Frost cc: Nagy =?iso-8859-1?B?TOFzemzz?= Zsolt , pgsql-admin@postgresql.org Subject: Re: md5 auth procotol - can it be replayed? In-reply-to: <20160507155124.GP10850@tamriel.snowman.net> References: <572E0BFE.7040709@shopzeus.com> <20160507155124.GP10850@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Sat, 07 May 2016 11:51:24 -0400" Date: Sat, 07 May 2016 12:28:37 -0400 Message-ID: <23281.1462638517@sss.pgh.pa.us> X-Pg-Spam-Score: -4.0 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Stephen Frost writes: > * Nagy László Zsolt (gandalf@shopzeus.com) wrote: >> Am I missing something? > There is a challenge/response compoent, so the md5 hash which is stored > is not what is sent across the wire. That prevents replay attacks when > the attacker is simply sniffing the network. Worth noting here is that the challenge key space is not all that huge, so an attacker who captures a large number of challenge/response pairs would have a good probability of being able to answer the next challenge successfully. However, if you're concerned about sniffing of your database connections happening on that scale, you really ought to be using SSL encryption which would make the whole thing moot. In many cases, capturing a database session would reveal lots of interesting data passing over the wire whether or not you'd captured a usable password --- so I'd call it fairly irresponsible to not be using SSL if you think your connection is open to sniffing. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin