[SWPUCTF 2021 新生赛]easy_sqld的解析
进入题目之后,我们看到了最上方告诉我们,参数是wllm,因此我们在后续的注入中使用的时wllm作为参数:
随后我们先尝试判断注入类型,先输入?wllm=1 and 1=1和?wllm=1 and 1=2
我们发现都没有变化说明这道题中的wllm是输入字符串
之后我们输入1‘得到报错为:
说明封闭符号为单引号,接着继续判断字段:
知道字段数为4。
之后,我们来进行查表,进行database()的查询之后得到为:
说明库名为:test_db
之后我们开始进行查列,我们可以得到:
之后进行查字段得到:
随后进行查列:
输入http://node4.anna.nssctf.cn:28607/?wllm=-1%27%20union%20select%201,2,group_concat(column_name)%20from%20information_schema.columns%20where%20table_schema=%27test_db%27%20and%20table_name=%27test_tb%27%20–+
随后我们通过group_concat(id,flag)从test_tb得到真实的flag。