Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [UNIX] Telnetd Allows Login as Arbitrary User |
|---|---|
| Date: | 4 Apr 2007 17:06:39 +0200 |
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 The SecuriTeam alerts list - Free, Accurate, Independent. Get your security news from a reliable source. http://www.securiteam.com/mailinglist.html - - - - - - - - - Telnetd Allows Login as Arbitrary User ------------------------------------------------------------------------ SUMMARY The MIT krb5 telnet daemon (telnetd) allows unauthorized login as an arbitrary user, when presented with a specially crafted username. Exploitation of this vulnerability is trivial. This is a vulnerability in an application program; it is not a bug in the MIT krb5 libraries or in the Kerberos protocol. DETAILS Vulnerable Systems: * telnetd in all releases of MIT krb5, up to and including krb5-1.6 Immune Systems: * telnetd in all releases of MIT krb5 krb5-1.6.1 Impact: A user can gain unauthorized access to any account (including root) on a host running telnetd. Whether the attacker needs to authenticate depends on the configuration of telnetd on that host. Fixes: * The upcoming krb5-1.6.1 release will contain a fix for this vulnerability. Prior to that release you may: * disable telnetd or * apply the patch This patch is also available at <http://web.mit.edu/kerberos/advisories/2007-001-patch.txt> http://web.mit.edu/kerberos/advisories/2007-001-patch.txt A PGP-signed patch is available at <http://web.mit.edu/kerberos/advisories/2007-001-patch.txt.asc> http://web.mit.edu/kerberos/advisories/2007-001-patch.txt.asc *** src/appl/telnet/telnetd/state.c (revision 19480) --- src/appl/telnet/telnetd/state.c (local) *************** *** 1665,1671 **** strcmp(varp, "RESOLV_HOST_CONF") && /* linux */ strcmp(varp, "NLSPATH") && /* locale stuff */ strncmp(varp, "LC_", strlen("LC_")) && /* locale stuff */ ! strcmp(varp, "IFS")) { return 1; } else { syslog(LOG_INFO, "Rejected the attempt to modify the environment variable \"%s\"", varp); --- 1665,1672 ---- strcmp(varp, "RESOLV_HOST_CONF") && /* linux */ strcmp(varp, "NLSPATH") && /* locale stuff */ strncmp(varp, "LC_", strlen("LC_")) && /* locale stuff */ ! strcmp(varp, "IFS") && ! !strchr(varp, '-')) { return 1; } else { syslog(LOG_INFO, "Rejected the attempt to modify the environment variable \"%s\"", varp); *** src/appl/telnet/telnetd/sys_term.c (revision 19480) --- src/appl/telnet/telnetd/sys_term.c (local) *************** *** 1287,1292 **** --- 1287,1302 ---- #endif #if defined (AUTHENTICATION) if (auth_level >= 0 && autologin == AUTH_VALID) { + if (name[0] == '-') { + /* Authenticated and authorized to log in to an + account starting with '-'? Even if that + unlikely case comes to pass, the current login + program will not parse the resulting command + line properly. */ + syslog(LOG_ERR, "user name cannot start with '-'"); + fatal(net, "user name cannot start with '-'"); + exit(1); + } # if !defined(NO_LOGIN_F) #if defined(LOGIN_CAP_F) argv = addarg(argv, "-F"); *************** *** 1377,1387 **** } else #endif if (getenv("USER")) { ! argv = addarg(argv, getenv("USER")); #if defined(LOGIN_ARGS) && defined(NO_LOGIN_P) { register char **cpp; for (cpp = environ; *cpp; cpp++) argv = addarg(argv, *cpp); } #endif --- 1387,1405 ---- } else #endif if (getenv("USER")) { ! char *user = getenv("USER"); ! if (user[0] == '-') { ! /* "telnet -l-x ..." */ ! syslog(LOG_ERR, "user name cannot start with '-'"); ! fatal(net, "user name cannot start with '-'"); ! exit(1); ! } ! argv = addarg(argv, user); #if defined(LOGIN_ARGS) && defined(NO_LOGIN_P) { register char **cpp; for (cpp = environ; *cpp; cpp++) + if ((*cpp)[0] != '-') argv = addarg(argv, *cpp); } #endif CVE Information: <http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-0956> CVE-2007-0956 ADDITIONAL INFORMATION The information has been provided by <mailto:tlyu@mit.edu> Tom Yu. The original article can be found at: <http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2007-001-telnetd.txt> http://web.mit.edu/kerberos/advisories/MITKRB5-SA-2007-001-telnetd.txt ======================================== 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.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [UNIX] Really Simple PHP and AJAX File Inclusion, SecuriTeam |
|---|---|
| Next by Date: | [UNIX] Double-Free Vulnerability in Kadmind (Via GSS-API Library), SecuriTeam |
| Previous by Thread: | [UNIX] Really Simple PHP and AJAX File Inclusion, SecuriTeam |
| Next by Thread: | [UNIX] Double-Free Vulnerability in Kadmind (Via GSS-API Library), SecuriTeam |
| Indexes: | [Date] [Thread] [Top] [All Lists] |