Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1az4Xa-0003p7-53 for pgsql-admin@arkaria.postgresql.org; Sat, 07 May 2016 15:53:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1az4XZ-0003Lp-0S for pgsql-admin@arkaria.postgresql.org; Sat, 07 May 2016 15:53:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1az4Vt-0001Tj-3y for pgsql-admin@postgresql.org; Sat, 07 May 2016 15:51:29 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1az4Vp-0001kI-Om for pgsql-admin@postgresql.org; Sat, 07 May 2016 15:51:28 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 116975F79A; Sat, 7 May 2016 11:51:25 -0400 (EDT) Date: Sat, 7 May 2016 11:51:24 -0400 From: Stephen Frost To: Nagy =?iso-8859-1?B?TOFzemzz?= Zsolt Cc: pgsql-admin@postgresql.org Subject: Re: md5 auth procotol - can it be replayed? Message-ID: <20160507155124.GP10850@tamriel.snowman.net> References: <572E0BFE.7040709@shopzeus.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="V0qMWm28XkADNbH3" Content-Disposition: inline In-Reply-To: <572E0BFE.7040709@shopzeus.com> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-77-generic (x86_64) X-Uptime: 11:47:31 up 74 days, 12:40, 22 users, load average: 0.12, 0.10, 0.07 User-Agent: Mutt/1.5.21 (2010-09-15) 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 --V0qMWm28XkADNbH3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Nagy L=E1szl=F3 Zsolt (gandalf@shopzeus.com) wrote: > How the md5 hashed authentication method works? Is it protected against > replay attacks? Here is what I have in mind: >=20 > * If the server stores salted hashed passwords, then I do not see how > the server could authenticate the users without getting the password in > clear text? If you're interested in how these things can be addressed, you should review the SCRAM protocol. > * If the server stores (unsalted) password hash values, then basically > there is almost no difference between a clear text password and an md5 > hash, because anyone can replay the send the same hash value and log in > again. If the hash was sent in the clear, then that would be true, but it isn't. > 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. If the attacker is able to acquire the as-stored hash then, yes, that can be used to authenticate. Thanks! Stephen --V0qMWm28XkADNbH3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJXLg78AAoJEO1sijiDR2RVmyEP/2CXFEdfd5E30JMqmOmxbl0M 7+RdIzdluXgZ1J7NpiObaSbsIke4sQG5CTtgz8fNfuoniTRb6+xEqnHgNNcWqE6U WPYSmo9vFxn3QDAUFkMPAy9PVCTDQQbZjbkIUY9P34MGG4aNPkAG7B4JJwKXChlK NkIuRBSop5iGl021OEbejqlXq7ix6O8Ofb6Je881iUcae2hTj9zu0SKN42FTeHgw cF+h/+fSD77qJ+i+ZwymEYP/9VHj6msRinTsoLhm/Tk/AWTCMkbCNpi43ymmaHAx vWywsapS6AKXZn1/uPI8IE249bNljs34Oqf/OOZUu6U5XjS2kTbDXH5rJ+Jb67yb m6WpKVu4bvOtsqCID6yOckpW8titU8Hmhr/NF23KStq2sfLdZyRkwsK3hkwqocnk l57c3k0O3suj2NQWLOZEFf23n6tNwHETvhP7++ULjA2n01W+6xRN5E9wZysoSsGi 8rVYpFFTO+ojlDK87XCE66WKx9bnFhLCFFcvoXaH7jfyM8ZhLodPtv2aI5CA4KAl RNBYXJXU22FcxyErckI0RrcvBt5KzFKWjyPGS2jAO1B3/mDb2K0E3WfB9G5zDa9t +OtxjNXbkOAX4A4e5bfjmPW1rHsrvrLCaUZQ0CXZq52DzqvYwCIq/F73Qh4N1uou ulob8/b2wTjMIkPhnjIH =Byo+ -----END PGP SIGNATURE----- --V0qMWm28XkADNbH3--