Unlimited Upload Vulnerability and repair in the bington Document Management System

Source: Internet
Author: User

 

Brief description: by default, the upload. asp file in the background is restricted only to asp | aspx | php | jsp | asa | shtml | html | htm | js | vbs.

Detailed description:

<! -- # Include file = "../inc/upload. asp" -->

 

<Html>

 

 

 

<Head>

 

<Meta http-equiv = "content-type" content = "text/html; charset = gb2312">

 

<Title> upload a file </title>

 

<Style>

 

* {Margin: 0px; padding: 0px ;}

 

Body {

 

Font-size: 12px;

 

}

 

. Border {

 

Font-size: 12px;

 

Border: #000 solid 1px;

 

}

 

</Style>

 

<Link rel = "stylesheet" rev = "stylesheet" href = "images/css.css" type = "text/css" media = "all"/>

 

 

 

</Head>

 

Www.2cto.com

 

<Body leftmargin = 0 topmargin = 0>

 

 

 

<%

 

Dim go: go = Request. QueryString ("go ")

 

If Request. QueryString ("action") = "upload" Then

 

Set upload = new my_upload

 

Dim filepath

 

Filepath = trim (upload. form ("filepath "))

 

For each formName in upload. File

 

Set file = upload. File (formName)

 

Dim o, txt, FileExt: FileExt = file. FileExt

 

 

 

Txt = Split ("asp | aspx | php | jsp | asa | shtml | html | htm | js | vbs", "| ")

 

For o = 0 To UBound (txt)

 

If InStr (LCase (FileExt), txt (o) <> 0 Then

 

Response. write "<script> alert ('your upload format is incorrect! '); Location. href = 'up. asp'; </script>"

 

Response. end

 

End if

 

Next

We can upload cer, ashx, and other files.

 

Solution: Modify the source code to only allow uploading images or adding vulnerability files

 

 

Author's dog-like man @ wooyun

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.