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