Likes Likes:  0
Resultaten 1 tot 4 van de 4
Geen
  1. #1
    Scott J
    AIX password enumeration possible
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    AIX password enumeration possible



    This advisory first submitted to BugTraq July 2003 - rejected but since a less detailed post on this subject made it to the list as a reply and there have been subsequent inquiries regarding it off-list, there may be interest in placing this on the list n
    ow.
    Email exchanges with BugTraq personnel (in July of last year) were the source of info that indicated Solaris may suffer from the same issue.
    Currently, BPR personnel can neither confirm or deny this behaviour exists in any OS other than AIX of versions mentioned below.

    ---------------- BinaryPowered Research advisory 2003-01 -----------------
    This advisory may be reproduced and redistributed in any manner.
    BPR and the author(s) of this advisory assume no liability for any misuse
    of information contained in this advisory. Neither BPR nor the author(s) are in any
    way liable for any damages caused by or believed to arise from
    this advisory.
    ---------------- BinaryPowered Research advisory 2003-01 -----------------

    Abstract: Remote password enumeration possible for
    accounts not permitted direct login in AIX
    Affected Systems: AIX 4.3.3 and AIX 5.1, likely other levels of AIX
    Vendor: International Business Machines Corporation (IBM)
    Severity: Low
    Result: Privilege escalation possible in some circumstances
    Vendor Notified: YES
    Vendor Response: Within one day
    Patch Issued: None available.
    Release date: 2003-07-17
    Rereleased: 2004-02-06

    --------------------------------------------------------------------------

    Discussion:

    During some configuration change and testing of AIX for a client, BPR discovered that it is possible to remotely enumerate the passwords of a known AIX account. The only configuration change required to allow this to happen in AIX is to disable remote lo
    gins for a given account (via the command "chuser rlogin=false a_userid"). If a remote attacker tries to connect to the vulnerable machine with an incorrect password (but a known correct account name), the response from AIX will be:
    "3004-007 You entered an invalid login name or password."
    In the case that the correct password is provided, the response is as follows:
    "3004-306 Remote logins are not allowed for this account."
    This different, unique response allows an attacker to determine the password of the account in question.

    Known Vulnerable:

    AIX 4.3.3 maintenance level 10 applied - assume all levels of AIX 4.3.3
    AIX 5.1 maintenance level 4 applied - assume all levels of AIX 5.1

    Rumored Vulnerable:

    Solaris (no version information available - not tested by BPR)

    Completely Untested / Unknown:

    Linux
    OpenBSD
    NetBSD
    FreeBSD
    BSD/OS
    HP-UX
    IRIX
    SCO
    Other OS'es

    Vulnerable authentication methods tested and verified:

    Local
    LDAP

    Access methods tested and verified:

    telnet
    rlogin
    rsh
    ssh ( OpenSSH - no commercial SSH variant tested )

    ++ Note: OpenSSH version most recently tested was the prepackaged version
    for AIX 5.1 currently available (as of Feb. 2004) on DeveloperWorks at:
    http://oss.software.ibm.com/develope...jects/opensshi
    It's not known for certain if this weakness would exist for an in-house
    compiled version of Portable OpenSSH on AIX but as the weakness is
    believed to be in the response from the login program after authentication
    has taken place, it would also likely be affected. Also, it makes no
    difference if sshd is configured to allow or disallow root login via
    the PermitRootLogin option.

    Exacerbating Factors:

    AIX only stores the first 8 characters of the password - if those first 8 characters are correct, the login will succeed, despite the fact that AIX's login program will accept passwords longer than 8 characters. I believe that the login program only store
    s and encrypts the first 8 characters (this is specualation, others on the list may know more definitively). This "weakness" also applies to the remote evaluation of a password of course, since the value stored for a password is only the encrypted equival
    ent of the first 8 characters.

    Mitigating Factors:

    To "exploit" this the attacker would have to have the ability to log on to the host in question with another userid since the account whose password has been enumerated obviously cannot be used for remote login. Alternately the attacker would require loc
    al (ie tty-equivalent) access to the machine. Worth noting is the fact that as long as the password is complex and is 8 characters, it will take a significant amount of
    time to determine the password of a target userid, possibly thousands or hundreds ofthousands of years to determine via brute-force using a remote connection.

    Severity:

    In a relatively "safe" environment such as a small business where external network logins are blocked this can be considered low priority but in a more hostile environment such as a service provider that permits shell-level access and has a relatively unt
    rustworthy userbase it should be considered much more dangerous if short or weak passwords are used
    for critical accounts.

    Solution:

    The correct solution would be to change the messages so that the response is consistent whether a correct or incorrect password is supplied. In AIX the messages that are returned for the various login actions can be found in /usr/lib/nls/msg/$LANG/tsm.ca
    t and /usr/lib/nls/msg/$LANG/libs.cat. To change them, perform the following:

    dspcat -g /usr/lib/nls/msg/$LANG/libs.cat > /tmp/new_libs.msg
    Change message in /tmp/new_libs.msg to make the messages consistent with one another
    Create the new catalog file, issue:
    gencat CatalogFile SourceFile
    Finally, copy message catalog back to it's intended location and test. This "customized" message catalog will quite possibly be wiped out by maintenance level upgrades etc. to AIX, so this would need to be verified and possibly repeated whenever an OS up
    grade is performed, if it makes any changes to the relevant message catalogs.

    Other suggestions to reduce exposure (but not eliminate it entirely):
    Give accounts that have been restricted from remote logins strong passwords.
    Change accounts that have been restricted from remote logins such that only specified groups can su to that account (similar to the "wheel" group concept in BSD).
    Change the delay for unsuccessful login attempts (via the "logindelay" parm in the login.cfg file). For every second that you increase the logindelay value, you make a bruteforce attack less likely to succeed by a corresponding magnitude.
    If your site is not already doing so ensure that unsuccessful login attempts are monitored with alerts sent to a human-montitored facility when unsuccessful login counts become too high.
    Where practical, suspend / lock accounts automatically when unsuccessful login thresholds are exceeded.
    Ensure that critical accounts have strong passwords, and have password strength enforcement in place.

    Vendor Response (paraphrased):

    =This is the expected response of AIX. This behaviour can be changed by performing the following.... (outlined above) To have this default behaviour changed, contact an IBM marketing rep to initiate a process called "Design Change Request".=

    BPR Response:

    It is disappointing that this is the out-of-the-box behaviour of an operating system that is a current offering of one of the largest computer hardware and software vendors in the market. Furthermore, it is quite bizarre to suggest that a customer should
    have to contact a marketing representative to request such a change in behaviour, technical people and security professionals at IBM should realize the need to change this behaviour, especially given how easy it would be to correct it.

    Closing Remarks:

    As the root account is the most powerful account on the system logic dictates that if a site is trying to improve the security posture of their AIX host(s), root accounts are among the most likely to be disabled for remote logins. This is generally a goo
    d measure to take, but particularly so when the password strength is effectively limited to 8 characters. Also, it is highly unusual to have the root account automatically
    suspended (if in fact this is possible - untested) because of invalid login attempts as this would require rebooting the server and bringing it into single user mode to correct. Taking these factors into account, root becomes the most likely to have att
    empted enumeration of it's password performed via brute-force methods. Furthermore, it is rare that the account with UID=0 will have had the account name associated with it changed from root, it can introduce difficult-to-diagnose problems including but
    probably not limited to idiotic major software vendors whose software install scripts do not validate that it is UID 0 invoking the install scripts, but instead perform a whoami inquiry expecting "root" to be the returned value.

  2. #2
    alex medvedev
    AIX password enumeration possible
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: AIX password enumeration possible

    Hallo,

    I think the privilege escalation risk here is not higher than
    remote password brut forcing.

    One only gets msg 3004-306 when she supplied the password correctly.
    This unique response does not "allow an attacker to determine
    the password" but simply states that the password was correct.

    Assuming an account is not remote login disabled:
    Don't you get a shell prompt when the correct passwd has been entered?
    Same here: user enters right passwd --> she gets the right message.

    Also, by the time you pick the passwd the AIX admin will have got you
    for filling up his root filesystem as each unsuccessful attempt adds
    about 650 bytes to /etc/security/failedlogin.
    Default AIX rootfs is 2 PP, which is usually 2x16=32 MB, i.e. it won't be
    long.

    Or should I stop smoking crack?

    -alexm
    14:45 11/02/2004

    On 6 Feb 2004, Scott J wrote:

    >
    >
    > This advisory first submitted to BugTraq July 2003 - rejected but since a less detailed post on this subject made it to the list as a reply and there have been subsequent inquiries regarding it off-list, there may be interest in placing this on the list

    now.
    > Email exchanges with BugTraq personnel (in July of last year) were the source of info that indicated Solaris may suffer from the same issue.
    > Currently, BPR personnel can neither confirm or deny this behaviour exists in any OS other than AIX of versions mentioned below.
    >
    > ---------------- BinaryPowered Research advisory 2003-01 -----------------
    > This advisory may be reproduced and redistributed in any manner.
    > BPR and the author(s) of this advisory assume no liability for any misuse
    > of information contained in this advisory. Neither BPR nor the author(s) are in any
    > way liable for any damages caused by or believed to arise from
    > this advisory.
    > ---------------- BinaryPowered Research advisory 2003-01 -----------------
    >
    > Abstract: Remote password enumeration possible for
    > accounts not permitted direct login in AIX
    > Affected Systems: AIX 4.3.3 and AIX 5.1, likely other levels of AIX
    > Vendor: International Business Machines Corporation (IBM)
    > Severity: Low
    > Result: Privilege escalation possible in some circumstances
    > Vendor Notified: YES
    > Vendor Response: Within one day
    > Patch Issued: None available.
    > Release date: 2003-07-17
    > Rereleased: 2004-02-06
    >
    > --------------------------------------------------------------------------
    >
    > Discussion:
    >
    > During some configuration change and testing of AIX for a client, BPR discovered that it is possible to remotely enumerate the passwords of a known AIX account. The only configuration change required to allow this to happen in AIX is to disable remote

    logins for a given account (via the command "chuser rlogin=false a_userid"). If a remote attacker tries to connect to the vulnerable machine with an incorrect password (but a known correct account name), the response from AIX will be:
    > "3004-007 You entered an invalid login name or password."
    > In the case that the correct password is provided, the response is as follows:
    > "3004-306 Remote logins are not allowed for this account."
    > This different, unique response allows an attacker to determine the password of the account in question.


    <deleted...>




  3. #3
    Sven Specker
    AIX password enumeration possible
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: AIX password enumeration possible

    Tested with AIX 5.1 ML05, Commercial SSH v3.2.2

    Known account on yyyy set to rlogin=false, ssh allows only 1 connection attempt before error.


    Case 1: Incorrect Password given.

    user@xxxx:> ssh yyyy
    user's password:
    warning: Authentication failed.
    Disconnected; no more authentication methods available (No further authentication methods available.).


    Case 2: Correct Password given.

    user@xxxx:> ssh yyyy
    user's password:
    warning: Authentication failed.
    Disconnected; no more authentication methods available (No further authentication methods available.).


    It seems as if the commercial ssh behaves differently and uses it's own messages. All r-services and telnet are no longer existant on our systems, so it appears to me that the easiest solution would be to use the commercial ssh and dump the r-services. Th
    at's seems the best way for ppl who are eligible to use the source release of the commercial ssh.

    Regards,

    Sven Specker

    --
    __________________________________________________ ________________
    *** Sven Specker -- University of Frankfurt Computing Center ***
    ************ UNIX System Administration (NIM/Security) ***********
    ***** specker@rz.uni-frankfurt.de [Phone (+49)-69-798-25188] *****
    ************************************************** ****************
    __________________________________________________ ________________
    Johann Wolfgang Goethe Universitaet
    - Hochschulrechenzentrum -
    Senckenberganlage 31-33

    D-60054 Frankfurt/Main
    __________________________________________________ ________________
    ______________ TeX-users do it in {groups}________________________

  4. #4
    Darren Tucker
    AIX password enumeration possible
    Gast
    n/a Berichten
    Berichten zijn liked



    Thread Starter

    Re: AIX password enumeration possible

    Scott J wrote:
    [snippage]
    > Abstract: Remote password enumeration possible for
    > accounts not permitted direct login in AIX
    > Affected Systems: AIX 4.3.3 and AIX 5.1, likely other levels of AIX

    [...]
    > Known Vulnerable:
    >
    > AIX 4.3.3 maintenance level 10 applied - assume all levels of AIX 4.3.3
    > AIX 5.1 maintenance level 4 applied - assume all levels of AIX 5.1

    [...]
    > Access methods tested and verified:

    [...]
    > ssh ( OpenSSH - no commercial SSH variant tested )
    >
    > ++ Note: OpenSSH version most recently tested was the prepackaged version
    > for AIX 5.1 currently available (as of Feb. 2004) on DeveloperWorks at:
    > http://oss.software.ibm.com/develope...jects/opensshi
    > It's not known for certain if this weakness would exist for an in-house
    > compiled version of Portable OpenSSH on AIX but as the weakness is
    > believed to be in the response from the login program after authentication
    > has taken place, it would also likely be affected. Also, it makes no
    > difference if sshd is configured to allow or disallow root login via
    > the PermitRootLogin option.


    Could you please elaborate how you were able to cause this behaviour
    with OpenSSH's sshd? (ssh -vvv and matching sshd -ddd would be very
    helpful, feel free to send those to me directly or post to the OpenSSH
    devel list: openssh-unix-dev at mindrot.org.)

    An account with rlogin=false will cause the loginrestrictions test (in
    getpwnamallow() in auth.c) to fail. The remainder of the
    authentications will consider the user "illegal" but should not give any
    external indication of this. You will see "3004-306 Remote logins are
    not allowed for this account" on the server side if you have debugging
    enabled, but this is (well, should) not sent to the user.

    I tested "openssh361p2_51_patch.tar.Z" from the IBM site on 5.1 ML4 and
    was not able to reproduce the described behaviour with the default
    config. The only way I could cause it was with the root account with
    PermitRootLogin=yes and UseLogin=yes. PermitRootLogin=no prevented it,
    and UseLogin is not on by default (at least in the vanilla OpenSSH
    distribution).

    --
    Darren Tucker (dtucker at zip.com.au)
    GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
    usually comes from bad judgement.

Webhostingtalk.nl

Contact

  • Rokin 113-115
  • 1012 KP, Amsterdam
  • Nederland
  • Contact
© Copyright 2001-2026 Webhostingtalk.nl.
Web Statistics