How to handle IIS FastCGI vulnerability, iisfastcgi

Source: Internet
Author: User

How to handle IIS FastCGI vulnerability, iisfastcgi

FastCGI Parsing Vulnerability: Improper configuration of WebServer Fastcgi may cause other files (such as css, js, jpg and other static files) to be parsed and executed as php scripts. When a user uploads a malicious script webshell to a static file and passes it to the backend php for parsing and execution, attackers can obtain high-risk vulnerability addresses (URLs) for server operation permissions) parameter Request Method discovery time recovery time duration

GET July 16 not restored to the present solution configure webserver to disable cgi. fix_pathinfo to 0 or configure webserver to filter out special PHP file paths such:

if ( $fastcgi_script_name ~ ..*/.*php ){return 403;}

Most nginx users have this vulnerability on the Internet. Here, the customer's environment is IIS of windows server 2008R2. Here I find the php double-click in 'handler 'to enter this interface.

Go to 'request limited'

OK.

Test:

Create a new phpinfo(your JPG file test.jpg in the root directory on the server, access the http://www.xxx.com/test.jpg/1.php (php name after test.jpg), if there is a vulnerability, you can see the phpinfo () information, and vice versa will return 404 error.

Postscript:

Nginx to solve this problem, the solution on the Internet is to write

Try_files $ fastcgi_script_name = 404;

Go to fastcgi. conf and reference it in location.

location ~ \.php$ {fastcgi_pass unix:/tmp/phpfpm/php-fpm.sock;include fastcgi.conf;}

Of course, you can refer to this Article. Solution: iis php fastcgi pattern pathinfo value error any code execution vulnerability fix

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.