MySQL开启远程访问
将权限改为ALL PRIVILEGES
mysql> use mysql; Database changed mysql> grant all privileges on *.* to root@'%' identified by "password"; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> select host,user,password from user; +--------------+------+-------------------------------------------+ | host | user | password | +--------------+------+-------------------------------------------+ | localhost | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E | | 192.168.1.1 | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E | | % | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E | +--------------+------+-------------------------------------------+ 3 rows in set (0.00 sec)
这样机器就可以以用户名root密码root远程访问该机器上的MySql.
1.auxiliary/scanner/mysql/mysql_login
2.auxiliary/scanner/mysql/mysql_login
如果数据库允许外链,则可以破解密码。此模块无默认密码,需要创建一个pass.txt
3.auxiliary/admin/mysql/mysql_enum
这个模块枚举的信息包括mysql版本号,操作系统架构,路径和密码hash等一些信息 。
4.auxiliary/scanner/mysql/mysql_hashdump
该模块利用CVE-2012-2122,mysql任意用户密码概率登陆漏洞。(概率问题,有时候不好用)