[UNIX] QPopper in Conjunction with PAM Allows Account Verification

From: support@securiteam.com
Date: 09/02/01


From: support@securiteam.com
To: list@securiteam.com
Subject: [UNIX] QPopper in Conjunction with PAM Allows Account Verification
Message-Id: <20010902070517.DAED8138BF@mail.der-keiler.de>
Date: Sun,  2 Sep 2001 09:05:17 +0200 (CEST)

The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

When was the last time you checked your server's security?
How about a monthly report?
http://www.AutomatedScanning.com - Know that you're safe.
- - - - - - - - -

  QPopper in Conjunction with PAM Allows Account Verification
------------------------------------------------------------------------

SUMMARY

When QPopper is used in conjunction with PAM (authentication module), a
remote attacker is able to verify whether the remote host contains a
certain user name by checking the respond sent back when entering a
username and password combination.

DETAILS

Vulnerable systems:
QPopper version 4.0.1 with PAM

Example:
Existing account:
# telnet 10.10.10.1 110
Trying 10.10.10.1...
Connected to 10.10.10.1.
Escape character is '^]'.
+OK ready <22975.998689264@target.host>
user validuser
+OK Password required for validuser.
pass valid
-ERR [AUTH] PAM authentication failed for user "validuser": Authentication
failure (7)
+OK Pop server at target.host signing off.
Connection closed by foreign host.

Non-existent account:
# telnet 10.10.10.1 110
Trying 10.10.10.1...
Connected to 10.10.10.1.
Escape character is '^]'.
+OK ready <22984.998689464@target.host>
user fakeuser
+OK Password required for fakeuser.
pass fakeeeee
-ERR [AUTH] Password supplied for "fakeuser" is incorrect.
+OK Pop server at target.host signing off.
Connection closed by foreign host.

If you look carefully for the differences between the two sessions, you
will see they give different auth fail responses. Using this, you can
brute force and verify whether an account exists or not.

Patch:
The following patch fixes this behavior:
---cut---
--- popper/pop_pass.c.orig Sat Aug 25 19:05:41 2001
+++ popper/pop_pass.c Sat Aug 25 19:06:58 2001
@@ -368,7 +368,7 @@
  */
 static int gp_errcode = 0;
 static char *GP_ERRSTRING =
- "[AUTH] PAM authentication failed for user \"%.100s\": %.128s
(%d)";
+ "[AUTH] Password supplied for \"%.100s\" is incorrect.";

 static int
 PAM_qpopper_conv ( int num_msg,
---cut---

ADDITIONAL INFORMATION

The information has been provided by <mailto:presto@tpgn.net> Charles
Chear.

========================================

This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

====================
====================

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



Relevant Pages

  • Re: Tacacs and OpenSSH
    ... "Also make sure you do have a local user account and it is not locked. ... You must need a local account even though the authentication is done ... I am trying to have sshd use the local account as defined on the TACACS server. ... So my TACACS pam is getting called with the incoming user. ...
    (SSH)
  • Re: How restrict network login on AIX for everything BUT SSH? (RLOGIN=FALSE & loginrestrictions
    ... Unfortunately I WANT to disable telnet, rsh, rlogin etc for an account, ... BUT keep SSH enabled. ... However in Aix v5.3 full ... pam support was added, and our LAM module broke and we have been unable ...
    (comp.security.ssh)
  • Re: FreeBsd e-mail question
    ... I'm running Sendmail and Qpopper on FreeBsd. ... This isn't a problem unless we add another account with the same username. ... Is there anyway to have rmuser remover the mail drop file associated with that account also, or am I just going to have to remove these manually? ... MailScanner thanks transtec Computers for their support. ...
    (freebsd-questions)
  • Re: Tacacs and OpenSSH
    ... So my TACACS pam is getting called with the incoming user. ... Then restart sshd. ... Also make sure you do have a local user account and it is not locked. ... >> contacts the TACACS server. ...
    (SSH)
  • Re: SSH and no-account logins
    ... > I'm looking for a way to enable accounts that do not have an account on the ... I'd like sshd to pass the ... > username to PAM without rejecting the login attempt outright. ... > decide what to do based on whether the account exists. ...
    (SSH)