| 以下是引用片段: <script>alert("樱花浪子")</script> |

| 以下是引用片段: function addpost(){ //添加留言 global $submit,$lname,$admin,$u_name,$u_face,$u_emote,$u_hide,$u_sex,$u_mail,$u_oicq,$u_page,$u_text; global $user_time; if($submit){ if(($u_name=trim($u_name))=='') showerro ("昵称不能为空,请重新填写!"); elseif(time() - $user_time < $admin[timeout]) showerro ("为防止灌水,发留言间隔为 $admin[timeout] 秒"); elseif (checkemail($u_mail)) showerro("你邮件没有填写或填写有错误!"); elseif (eregi("[<>(),#|;%/$\]",$u_mail)) showerro("邮件填写不能包含特殊字符!"); elseif (strlen($u_name) >15) showerro("昵称太长,非法ID!"); elseif (eregi("[<>(),#|;%/$\]+",$u_name)) showerro("昵称只能是字母数字或中文,请不要包含< > | ?等特殊字符"); elseif ($u_oicq && !ereg("^[0-9]{5,13}$",$u_oicq)) showerro("OICQ号码只能为数字!"); elseif (eregi("[<>(),#|;%$\]+",$u_page)) showerro("主页填写有错误,主页名字只能包含字母数字下划线和-号!"); elseif (!eregi("^http://",$u_page)) showerro("主页开头要加http://"); elseif (($u_text=trim($u_text))=="") showerro("留言内容不能为空,请重新填写!"); //这里好象不是很严格啊 elseif (strlen($u_text)>$admin[maxlen]) showerro("留言太长了,想把留言簿撑爆呀!"); else { if ($u_oicq=="") $u_oicq="未知"; if ($u_page=="") $u_page="http://"; $u_text = safeinput($u_text); //safeinput自定义函数 if ($u_hide) $u_text='[HIDE]<b>悄悄话:</b>'.$u_text.'[/HIDE]'; 代码略…… showok("留言成功,感谢你对我们的支持!"); } }else showerro("非法操作!"); |
在看看safeinput函数:
function safeinput($d) { //输入内容安全转换
$d = str_replace("\t",'',$d);
$d = str_replace("\r",'',$d);
$d = str_replace('<','<',$d);
$d = str_replace('>','>',$d);
$d = str_replace("\n",'<br>',$d);
$d = str_replace('|','│',$d);
$d = str_replace(' ',' ',$d);
$d = preg_replace("/\[\/HIDE\]/is",'',$d);// 悄悄话
return $d;
}
好象没有[和]呀,在签写留言中试了一下javascript:alert('樱花浪子'),成功了,如图2,
接下来干什么呢,想要玩的精彩,当然是引起来一个JS文件了,这样通过修改JS文件内容就可以做很多事情拉。
| 利用XSS渗透校内网的过程详解 | 01-28 | |
| Mysql5注射技巧总结 | 01-28 | |
| 对红色黑客联盟的一次检测 | 01-28 | |
| SQL注入高级技巧nowthk篇 | 01-28 | |
| 酷蝶XP留言簿的跨站利用 | 01-28 | |
| 跨站跨出WEBSHELL---网域高科行业 | 01-28 | |
| 黑客如何利用文件包含漏洞进行网 | 01-24 | |
| Dvbbs8.1 0DAY(通杀access和mssq | 01-09 | |
| 辽宁文学艺术网的沦陷-eWebEdit | 01-09 | |
| 入侵网站拿下服务器的实战演示 | 01-09 | |
| 渗透入侵土耳其XXX网站!~ | 12-21 | |
| BBSGood.Speed Version 4.0注入漏 | 12-21 | |