|
首先来分析下代码的意思,程序先判断用户提交的一些内容是否为空,不为空的话就获取表单中的提交参数,并赋值给变量,然后再分别写入到数据库里, ,返回给来访的用户只有”主题”和”留言内容”是我们可以控制的, 其中用户提交的内容(content)这项用htmlencode2函数进行了过滤了,我们再来看看htmlencode2函数都过滤些什么,在Inc/articleCHAR.INC文件中找到了htmlencode2函数的内容,其中的代码如下:
代码片段二:
<%
function htmlencode2(str)
dim result
dim l
if isNULL(str) then
htmlencode2=""
exit function
end if
l=len(str)
result=""
dim i
for i = 1 to l
select case mid(str,i,1)
case "<"
result=result+"<"
case ">"
result=result+">"
case chr(13)
result=result+"<br>"
case chr(34)
result=result+"""
case "&"
result=result+"&"
case chr(32)
'result=result+" "
If……..以下略过 |
跨站用到的一些常用的符号都被相应的转换掉了,看来只能是在”主题”里插入,可长度有限制,代码里 “<input type="text" name="Title" size="42" maxlength="36" style="font-size: 14px" >”限制了提交的长度,大家知道<script src=></script>用掉了22个字符,还有14个字符可以让我们自由发挥了,不过,我们还可以简单的构造表单,进行外部提交跨站,复制其源代码后,自己简单的构造一个表单,注意补齐action后的路径和改变”主题”处的提交长度,我这儿为”100”保为1.htm,打开后,在”主题”里写入挂马的代码,”<iframe src=http://www.baidu.com width =300 height=300></script>”,如图1:
 (图1)
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页 |