网站漏洞整改报告记录文档格式.docx
《网站漏洞整改报告记录文档格式.docx》由会员分享,可在线阅读,更多相关《网站漏洞整改报告记录文档格式.docx(9页珍藏版)》请在冰豆网上搜索。
安全
漏洞类型:
SQL注入/XPath
请求方式:
POST
som.lHBedu.cn
影响页面:
http:
//som.fl^|U|edu.cn/webDeanBoxAction.do
处理方案:
通过在Web应用程序中增加通用防注入程序来防止SQL注入攻击。
通用SQL防注入程序通常
在数据库连接文件中被引入,并在程序执行过
程中对常见的GETPOSTCookie等提交方式
进行过滤处理,拦截可能存在的SQL注入攻击。
SQL注入/XPath、XSS跨站脚本攻击
syscmwpu.edu.c
此网站已经新做,新版正测试中,马上投入使用。
漏洞类型:
XSS跨站脚本攻击
\*+?
\*/|v\s*script\b|\bEXEC\b|UNION.+?
SELEC
T|UPDATE.+?
SET|INSERT\s+INTO.+?
VALUES|(SEL
ECT|DELETE).+?
FROM|(CREATE|ALTER|DROP|TR
UNCATE)\s+(TABLE|DATABASE)"
)
ifRequest.ServerVariables("
HTTP_REFERER"
)<
>
"
thencall
test(Request.ServerVariables("
),"
'
*/|v\s*script\b|\bEXEC\b|UNION.+?
SELECT|UPD
ATE.+?
VALUES|(SELECT|DE
LETE).+?
FROM|(CREATE|ALTER|DROP|TRUNCATE
)\s+(TABLE|DATABASE)"
ifrequest.Cookies<
thencall
stophacker(request.Cookies,"
\b(and|or)\b.{1,6}?
(bEXEC\b|UNION.+?
SELECT|UPDATE.+?
SET|INSER
T\s+INTO.+?
VALUES|(SELECT|DELETE).+?
FRCM|(
CREATE|ALTER|DROP|TRUNCATE)\s+(TABLE|DAT
ABASE)"
)callstophacker(request.Form,"
A\+/v(8|9)|\b(and|or)
\b.{1,6}?
(=|>
|v|\bin\b|\blike\b)|/\*.+?
\*/|<
\s*s
cript\b|v\s*img\b|\bEXEC\b|UNION.+?
SELECT|U
PDATE.+?
VALUES|(SEL.ECT
|DELETE).+?
FROM|(CREATE|ALTER|DROP|TRUN
CATE)\s+(TABLE|DATABASE)"
)functiontest(values,re)
dimregex
setregex=newregexpregex.ignorecase=trueregex.global=trueregex.pattern=reifregex.test(values)then
IP=Request.ServerVariables("
HTTP_X_FORWARD_FOR"
IfIP="
Then
REMOTE_ADDR"
)endif
slog("
<
br>
操作IP:
"
&
ip&
操作时间:
&
now()&
操作页面:
Request.ServerVariables("
URL"
)&
br提交方式:
Request_Method"
提交参数:
l_get&
提交数据:
l_get2)
Response.Write("
div
style='
position:
fixed;
top:
0px;
width:
100%;
height:
100%;
background-color:
white;
color:
green;
font-weight:
bold;
border-bottom:
5pxsolid#999;
您的提交带有不合法参数,谢谢合作!
v/div>
)Response.end
endif
setregex=nothing
endfunction
functionstophacker(values,re)diml_get,I_get2,n_get,regex,IPforeachn_getinvalues
foreachl_getinvaluesl_get2=values(l_get)setregex=newregexpregex.ignorecase=trueregex.global=trueregex.pattern=reifregex.test(l_get2)then
lget2)
您的提交带有不合法参数,谢谢合作!
brx/div>
Response.end
next
subslog(logs)
dimtoppath,fs,Ts
toppath=Server.Mappath("
/log.htm"
Setfs=
CreateObject("
scripting.filesystemobject"
IfNot
Fs.FILEEXISTS(toppath)Then
Set
Ts=fs.createtextfile(toppath,True)
Ts.close
Ts=Fs.OpenTextFile(toppath,8)
Ts.writeline(logs)
Ts.Close
Ts=nothing
fs=nothing
endsub
%>
info.nWPI.edu.cn
漏洞证据:
script>
alert(42873)v/script>
http:
//info.nWPH:
80/servlet/Redirect?
linkt
o=/structure/wqfw"
-->
;
alert(42873);
方案一:
站在安全的角度看,必须过滤用户输入的危险数据,默认用户所有的输入数据都是不安全的,根据自身网站程序做代码修改。
方案二:
使用防护脚本。
输入资料过滤
%
Stringmessage=
request.getParameter("
message"
);
message=message.replace('
'
\'
/'
%'
message=message.replace('
('
)'
+'
_'
out.print(message);
rei.nwpuedu.cn
SQL注入漏洞(盲注)
InjectionType:
String<
DatabaseType:
Access
//rei.nW^Uedu.cn/book/own_show_showim
g.asp?
own_id=122
1•在网页代码中需要对用户输入的数据进行严
格过滤。
(代码女口info.nwBU-)
2•部署Web应用防火墙
3.对数据库操作进行监控
通过本次网站安全检查,发现使用学校统一的站群做的网站都没有问题,发现问题的都是各部门自建的网站,以后要加强安全管理宣传,自建网站逐步过渡到统一的站群管理系统以方便安全管理。
进一步规范管理,加强检查。
不断完善细化信息公开内容,增加发布信息量,提高数据的及时性、准确性,增强服务意识,推动各项工作健康有序发展。