X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5635D53DC7 for ; Thu, 21 Apr 2005 08:03:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34427-04 for ; Thu, 21 Apr 2005 11:03:51 +0000 (GMT) Received: from relay.khleuven.be (relay.khleuven.be [193.190.138.22]) by svr1.postgresql.org (Postfix) with ESMTP id 89A7853D71 for ; Thu, 21 Apr 2005 08:03:49 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by relay.khleuven.be (Postfix) with ESMTP id 75B0CBC810; Thu, 21 Apr 2005 13:03:51 +0200 (CEST) Received: from [10.2.10.238] (unknown [10.2.10.238]) by relay.khleuven.be (Postfix) with ESMTP id 9920EBC80B; Thu, 21 Apr 2005 13:03:48 +0200 (CEST) Message-ID: <42678890.3020109@khleuven.be> Date: Thu, 21 Apr 2005 13:03:44 +0200 From: Wim Bertels User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; nl-NL; rv:1.7.3) Gecko/20040910 X-Accept-Language: nl-be, nl, en-us, en MIME-Version: 1.0 To: Bruno Wolff III Cc: pgsql-admin@postgresql.org Subject: Re: brute force attacking the password References: <200504182027.j3IKRtV09046@candle.pha.pa.us> <42651CFF.1020703@khleuven.be> <20050419203727.GA18200@wolff.to> <200504192254.41977.wim.bertels@khleuven.be> <20050420152044.GB512@wolff.to> In-Reply-To: <20050420152044.GB512@wolff.to> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/295 X-Sequence-Number: 17308 Bruno Wolff III schreef: >On Tue, Apr 19, 2005 at 22:54:32 +0200, > Wim Bertels wrote: > > >>not an easy problem: it always seems to end up in DoS vs Brute Force Cracking. >>So the only good and simple solution i can think of: use the best possible >>password encrytion (or sufficient, a statistically zero chance when trying as >>much connections -to brute force crack the password- as possible for a >>significant amount of time.) >> >> > >Maybe you can use client side certificates. Those will be from a large >enough space that guessing shouldn't be a problem. You should be able to >make that work with PAM. > > indeed. since brute force attacks are quit traceable (targetting one and the same user eg..), one could a script to check: - the percentage of failed logins/user, depending on the percentage (eg 75% or more failed, this should be configurable), these events should be reporteg in security.log file under the postgres log directory, or mailed to user (inetd...) - if there are more than eg 10 (this should be configurable) failed consecutive logins/user, this should again be reported. if i have time: maybe a quick perl script using the postgres.log file with sufficient logging to obtain these facts? so: possible implementation so far: 1. choose the possible crypting for the password 2. implement someway the above checking (% failed logins/user + < failed login/user) 3. using client side certificates with pam, pam_ldap (not sure how to set this up right know, a certificate/user (having many users, not all specialists,..., how to make this work a user-acceptible way..); or just a few (or 1) client side certificates that can be used by many users (sounds more easy, accessible to set up for the users)