Apache php extension parsing vulnerability

Source: Internet
Author: User
Tags apache php
We all know that in Windows + IIS6.0, if there is a directory like xxx. asp in the directory structure, all files under this directory will be parsed as asp regardless of the extension. We generally call this vulnerability windows2003 + iis6.0 directory parsing vulnerability. But what you may not know is that the apache server also

We all know that in Windows + IIS6.0, if there is a directory like xxx. asp in the directory structure, all files under this directory will be parsed as asp regardless of the extension. We generally call this vulnerability windows2003 + iis6.0 directory parsing vulnerability. However, what you may not know is that the apache server has similar parsing vulnerabilities.
Let's start the experiment. I have built a local apache + php testing platform.

 

Two files: phpinfo. php phpinfo. php. a. visit phpinfo. php..
Http: // 192.168.99.110/phpinfo. php.

 

It can be parsed and can still be changed to another suffix.
No matter what the last suffix of the file is, as long as it is. php. * The end is parsed into a php file by the Apache server. The problem is that if apache is in mime. the types file does not have a defined extension such as x1.x2. in the case of x3, the last x3 is not defined, and it will be parsed into the second-to-last x2 defined extension. Xxx.php.rar or xxx. php.111 will be parsed to php if they are not defined in the mime. types file by default. The same is true for cgi or jsp...
If the file name is defined on the webpage of the web program, apache will still parse it as php, and we will test jpg again.

 


Defense method:
The apache configuration file prohibits execution of files such as. php.

Order Allow, Deny
Deny from all

 


Save. After apache is started, let's take a look.

 

 


OK. this is the defense method.

 

 

 

 

 


 


 

 

 


 

 

 

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.