Re: OpenSSH/PAM timing attack allows remote users identification

From: Thilo Schulz (arnyat_private)
Date: Thu May 01 2003 - 08:20:44 PDT

  • Next message: Valdis.Kletnieksat_private: "Re: [Full-Disclosure] Slow Internet?"

    On Wednesday, 30th April 2003 16:34 Marco Ivaldi wrote:
    > During a pen-test we stumbled across a nasty bug in OpenSSH-portable with
    > PAM support enabled (via the --with-pam configure script switch). This bug
    > allows a remote attacker to identify valid users on vulnerable systems,
    > through a simple timing attack. The vulnerability is easy to exploit and may
    > have high severity, if combined with poor password policies and other
    > security problems that allow local privilege escalation.
    
    This is !!NOT!! a problem specific to openssh.
    When I saw this topic come up I tried the same with proftpd, which also can 
    use pam to establish the user's authentication.
    
    here is an example with the simple ftp tool:
    thilo@Thilo thilo $ ftp www.someftphost.net
    Connected to www.someftphost.net.
    220 ProFTPD 1.2.5rc1 Server (Debian) [www.someftphost.net]
    Name (www.someftphost.net:thilo): thilo
    331 Password required for thilo.
    Password:
    [valid user account, but wrong password: 2seconds wait]
    530 Login incorrect.
    Login failed.
    ftp>
    
    same here, if this is an invalid user, there is no delay between the entering 
    of the password and the 530 reply.
    I tested the postfix smtp daemon, apache and ipopd pop3 daemon which have pam 
    support, there this weakness is obviously not present, yet don't consider all 
    daemons secure, there may still be many others out there that suffer from the 
    same weakness.
    
     - Thilo Schulz
    



    This archive was generated by hypermail 2b30 : Fri May 02 2003 - 13:37:01 PDT