IIS, Nginx, and Apache Vulnerabilities
IIS 5.x - 6.x Vulnerabilities
Directory parsing
Consider
www.xxx.com/webshell.asp/webshell.jpgHere
webshell.aspis a directory but IIS parses it as a filename.webshell.jpgwill be ignored.
Filename parsing
Consider
www.xxx.com/webshell.asp;.jpgIIS does not parse the content after
;, so the filename becomeswebshell.asp.
Default file extensions
IIS parses the following file extensions by default:
.asa.cer.cdx
Nginx Vulnerabilities
Filename parsing
www.xxx.com/webshell.jpg/idonotexist.phpIf the rightmost file does not exist, the Nginx parser moves to the left by one. In this case,
idonotexist.phpdoes not exist, sowebshell.jpgis parsed but it will be executed as.php.
Apache 1.x - 2.x Vulnerabilities
Filename parsing
webshell.php.testApache parses filename from right to left. If the current file type is not supported, the Apache parser moves to the left by one. Here
.testis not supported by Apache, hence the file is parsed aswebshell.php.
Configuration problems
AddHandler php5-script .phpThis configuration makes
webshell.php.jpgexecuted aswebshell.php.
AddType application/x-httpd-php .jpgLet
.jpgfiles be executed as.ph
Last updated
Was this helpful?